From 8406bf3d66d4be6aa4d30b7135bd2c57ca29bbe2 Mon Sep 17 00:00:00 2001 From: Jacob Wujciak-Jens Date: Fri, 22 Nov 2024 01:42:16 +0100 Subject: [PATCH] refactor velox_cursor into velox/exec as it's used by LocalRunner --- CMake/VeloxUtils.cmake | 1 - .../parquet/tests/writer/ParquetWriterTest.cpp | 2 +- velox/exec/CMakeLists.txt | 17 +++++++++++++++++ velox/exec/{tests/utils => }/Cursor.cpp | 2 +- velox/exec/{tests/utils => }/Cursor.h | 0 .../benchmarks/WindowPrefixSortBenchmark.cpp | 2 +- velox/exec/tests/DriverTest.cpp | 2 +- velox/exec/tests/GroupedExecutionTest.cpp | 2 +- velox/exec/tests/HashJoinTest.cpp | 2 +- velox/exec/tests/TableScanTest.cpp | 2 +- velox/exec/tests/TaskTest.cpp | 2 +- velox/exec/tests/utils/CMakeLists.txt | 16 ---------------- velox/exec/tests/utils/QueryAssertions.cpp | 2 +- velox/exec/tests/utils/QueryAssertions.h | 2 +- .../aggregates/benchmarks/ReduceAgg.cpp | 2 +- .../aggregates/benchmarks/SimpleAggregates.cpp | 2 +- .../aggregates/benchmarks/TwoStringKeys.cpp | 2 +- velox/runner/LocalRunner.h | 2 +- velox/runner/Runner.h | 2 +- 19 files changed, 32 insertions(+), 32 deletions(-) rename velox/exec/{tests/utils => }/Cursor.cpp (99%) rename velox/exec/{tests/utils => }/Cursor.h (100%) diff --git a/CMake/VeloxUtils.cmake b/CMake/VeloxUtils.cmake index 7b63fef0877e..aceb9b19175c 100644 --- a/CMake/VeloxUtils.cmake +++ b/CMake/VeloxUtils.cmake @@ -102,7 +102,6 @@ function(velox_link_libraries TARGET) # explicitly (this is a hack) set(explicit_targets velox_exec_test_lib - velox_cursor # see velox/experimental/wave/README.md velox_wave_common velox_wave_decode diff --git a/velox/dwio/parquet/tests/writer/ParquetWriterTest.cpp b/velox/dwio/parquet/tests/writer/ParquetWriterTest.cpp index 0de6eef55056..b5cb72ab52c1 100644 --- a/velox/dwio/parquet/tests/writer/ParquetWriterTest.cpp +++ b/velox/dwio/parquet/tests/writer/ParquetWriterTest.cpp @@ -24,7 +24,7 @@ #include "velox/dwio/parquet/RegisterParquetWriter.h" // @manual #include "velox/dwio/parquet/tests/ParquetTestBase.h" #include "velox/exec/tests/utils/AssertQueryBuilder.h" -#include "velox/exec/tests/utils/Cursor.h" +#include "velox/exec/Cursor.h" #include "velox/exec/tests/utils/PlanBuilder.h" #include "velox/exec/tests/utils/QueryAssertions.h" #include "velox/exec/tests/utils/TempDirectoryPath.h" diff --git a/velox/exec/CMakeLists.txt b/velox/exec/CMakeLists.txt index 73ca66635895..d1f680003b7a 100644 --- a/velox/exec/CMakeLists.txt +++ b/velox/exec/CMakeLists.txt @@ -109,6 +109,23 @@ velox_link_libraries( velox_arrow_bridge velox_common_compression) + +velox_add_library(velox_cursor Cursor.cpp) +velox_link_libraries( + velox_cursor + velox_core + velox_exception + velox_expression + velox_dwio_common + velox_dwio_dwrf_reader + velox_dwio_dwrf_writer + velox_type_fbhive + velox_hive_connector + velox_tpch_connector + velox_presto_serializer + velox_functions_prestosql + velox_aggregates) + if(${VELOX_BUILD_TESTING}) add_subdirectory(fuzzer) add_subdirectory(tests) diff --git a/velox/exec/tests/utils/Cursor.cpp b/velox/exec/Cursor.cpp similarity index 99% rename from velox/exec/tests/utils/Cursor.cpp rename to velox/exec/Cursor.cpp index ad7b4133c6c7..f8270649bed4 100644 --- a/velox/exec/tests/utils/Cursor.cpp +++ b/velox/exec/Cursor.cpp @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#include "velox/exec/tests/utils/Cursor.h" +#include "velox/exec/Cursor.h" #include "velox/common/file/FileSystems.h" #include "velox/exec/Operator.h" diff --git a/velox/exec/tests/utils/Cursor.h b/velox/exec/Cursor.h similarity index 100% rename from velox/exec/tests/utils/Cursor.h rename to velox/exec/Cursor.h diff --git a/velox/exec/benchmarks/WindowPrefixSortBenchmark.cpp b/velox/exec/benchmarks/WindowPrefixSortBenchmark.cpp index e762a7f821c2..c91f40a490f6 100644 --- a/velox/exec/benchmarks/WindowPrefixSortBenchmark.cpp +++ b/velox/exec/benchmarks/WindowPrefixSortBenchmark.cpp @@ -19,7 +19,7 @@ #include #include -#include "velox/exec/tests/utils/Cursor.h" +#include "velox/exec/Cursor.h" #include "velox/exec/tests/utils/HiveConnectorTestBase.h" #include "velox/exec/tests/utils/PlanBuilder.h" #include "velox/functions/prestosql/aggregates/RegisterAggregateFunctions.h" diff --git a/velox/exec/tests/DriverTest.cpp b/velox/exec/tests/DriverTest.cpp index 9b9327def22d..5893a821f203 100644 --- a/velox/exec/tests/DriverTest.cpp +++ b/velox/exec/tests/DriverTest.cpp @@ -24,7 +24,7 @@ #include "velox/exec/PlanNodeStats.h" #include "velox/exec/Values.h" #include "velox/exec/tests/utils/AssertQueryBuilder.h" -#include "velox/exec/tests/utils/Cursor.h" +#include "velox/exec/Cursor.h" #include "velox/exec/tests/utils/OperatorTestBase.h" #include "velox/exec/tests/utils/PlanBuilder.h" #include "velox/functions/Udf.h" diff --git a/velox/exec/tests/GroupedExecutionTest.cpp b/velox/exec/tests/GroupedExecutionTest.cpp index e2e788506a89..960636cda916 100644 --- a/velox/exec/tests/GroupedExecutionTest.cpp +++ b/velox/exec/tests/GroupedExecutionTest.cpp @@ -19,7 +19,7 @@ #include "velox/common/memory/MemoryArbitrator.h" #include "velox/exec/OutputBufferManager.h" #include "velox/exec/PlanNodeStats.h" -#include "velox/exec/tests/utils/Cursor.h" +#include "velox/exec/Cursor.h" #include "velox/exec/tests/utils/HiveConnectorTestBase.h" #include "velox/exec/tests/utils/PlanBuilder.h" #include "velox/exec/tests/utils/TempDirectoryPath.h" diff --git a/velox/exec/tests/HashJoinTest.cpp b/velox/exec/tests/HashJoinTest.cpp index 9c6da3a9b437..04649461d769 100644 --- a/velox/exec/tests/HashJoinTest.cpp +++ b/velox/exec/tests/HashJoinTest.cpp @@ -29,7 +29,7 @@ #include "velox/exec/PlanNodeStats.h" #include "velox/exec/tests/utils/ArbitratorTestUtil.h" #include "velox/exec/tests/utils/AssertQueryBuilder.h" -#include "velox/exec/tests/utils/Cursor.h" +#include "velox/exec/Cursor.h" #include "velox/exec/tests/utils/HiveConnectorTestBase.h" #include "velox/exec/tests/utils/PlanBuilder.h" #include "velox/exec/tests/utils/TempDirectoryPath.h" diff --git a/velox/exec/tests/TableScanTest.cpp b/velox/exec/tests/TableScanTest.cpp index 42cee37afb36..eb517d632f19 100644 --- a/velox/exec/tests/TableScanTest.cpp +++ b/velox/exec/tests/TableScanTest.cpp @@ -38,7 +38,7 @@ #include "velox/exec/PlanNodeStats.h" #include "velox/exec/TableScan.h" #include "velox/exec/tests/utils/AssertQueryBuilder.h" -#include "velox/exec/tests/utils/Cursor.h" +#include "velox/exec/Cursor.h" #include "velox/exec/tests/utils/HiveConnectorTestBase.h" #include "velox/exec/tests/utils/LocalExchangeSource.h" #include "velox/exec/tests/utils/PlanBuilder.h" diff --git a/velox/exec/tests/TaskTest.cpp b/velox/exec/tests/TaskTest.cpp index 474c1e4ca503..e05596c0be80 100644 --- a/velox/exec/tests/TaskTest.cpp +++ b/velox/exec/tests/TaskTest.cpp @@ -27,7 +27,7 @@ #include "velox/exec/PlanNodeStats.h" #include "velox/exec/Values.h" #include "velox/exec/tests/utils/AssertQueryBuilder.h" -#include "velox/exec/tests/utils/Cursor.h" +#include "velox/exec/Cursor.h" #include "velox/exec/tests/utils/HiveConnectorTestBase.h" #include "velox/exec/tests/utils/PlanBuilder.h" #include "velox/exec/tests/utils/QueryAssertions.h" diff --git a/velox/exec/tests/utils/CMakeLists.txt b/velox/exec/tests/utils/CMakeLists.txt index 76e0ca6a27b9..0df50966d54b 100644 --- a/velox/exec/tests/utils/CMakeLists.txt +++ b/velox/exec/tests/utils/CMakeLists.txt @@ -17,22 +17,6 @@ add_library(velox_temp_path TempFilePath.cpp TempDirectoryPath.cpp) target_link_libraries( velox_temp_path velox_exception) -add_library(velox_cursor Cursor.cpp) -target_link_libraries( - velox_cursor - velox_core - velox_exception - velox_expression - velox_dwio_common - velox_dwio_dwrf_reader - velox_dwio_dwrf_writer - velox_type_fbhive - velox_hive_connector - velox_tpch_connector - velox_presto_serializer - velox_functions_prestosql - velox_aggregates) - add_library( velox_exec_test_lib AssertQueryBuilder.cpp diff --git a/velox/exec/tests/utils/QueryAssertions.cpp b/velox/exec/tests/utils/QueryAssertions.cpp index c13a9a049c34..b2e991b70aae 100644 --- a/velox/exec/tests/utils/QueryAssertions.cpp +++ b/velox/exec/tests/utils/QueryAssertions.cpp @@ -20,7 +20,7 @@ #include "duckdb/common/types.hpp" // @manual #include "velox/duckdb/conversion/DuckConversion.h" #include "velox/exec/tests/utils/ArbitratorTestUtil.h" -#include "velox/exec/tests/utils/Cursor.h" +#include "velox/exec/Cursor.h" #include "velox/exec/tests/utils/QueryAssertions.h" #include "velox/functions/prestosql/types/TimestampWithTimeZoneType.h" #include "velox/vector/VectorTypeUtils.h" diff --git a/velox/exec/tests/utils/QueryAssertions.h b/velox/exec/tests/utils/QueryAssertions.h index 1b60b56e6e13..1dc55f9365b2 100644 --- a/velox/exec/tests/utils/QueryAssertions.h +++ b/velox/exec/tests/utils/QueryAssertions.h @@ -19,7 +19,7 @@ #include "velox/common/testutil/TestValue.h" #include "velox/core/PlanNode.h" #include "velox/exec/Operator.h" -#include "velox/exec/tests/utils/Cursor.h" +#include "velox/exec/Cursor.h" #include "velox/vector/ComplexVector.h" #include // @manual diff --git a/velox/functions/prestosql/aggregates/benchmarks/ReduceAgg.cpp b/velox/functions/prestosql/aggregates/benchmarks/ReduceAgg.cpp index 39ef1f99c9d5..4fe8bdef3f84 100644 --- a/velox/functions/prestosql/aggregates/benchmarks/ReduceAgg.cpp +++ b/velox/functions/prestosql/aggregates/benchmarks/ReduceAgg.cpp @@ -17,7 +17,7 @@ #include #include -#include "velox/exec/tests/utils/Cursor.h" +#include "velox/exec/Cursor.h" #include "velox/exec/tests/utils/HiveConnectorTestBase.h" #include "velox/exec/tests/utils/PlanBuilder.h" #include "velox/vector/fuzzer/VectorFuzzer.h" diff --git a/velox/functions/prestosql/aggregates/benchmarks/SimpleAggregates.cpp b/velox/functions/prestosql/aggregates/benchmarks/SimpleAggregates.cpp index 58edb37da9a2..3018ce78582a 100644 --- a/velox/functions/prestosql/aggregates/benchmarks/SimpleAggregates.cpp +++ b/velox/functions/prestosql/aggregates/benchmarks/SimpleAggregates.cpp @@ -18,7 +18,7 @@ #include #include -#include "velox/exec/tests/utils/Cursor.h" +#include "velox/exec/Cursor.h" #include "velox/exec/tests/utils/HiveConnectorTestBase.h" #include "velox/exec/tests/utils/PlanBuilder.h" #include "velox/vector/fuzzer/VectorFuzzer.h" diff --git a/velox/functions/prestosql/aggregates/benchmarks/TwoStringKeys.cpp b/velox/functions/prestosql/aggregates/benchmarks/TwoStringKeys.cpp index 8c43c625851e..f2625b4237af 100644 --- a/velox/functions/prestosql/aggregates/benchmarks/TwoStringKeys.cpp +++ b/velox/functions/prestosql/aggregates/benchmarks/TwoStringKeys.cpp @@ -18,7 +18,7 @@ #include #include "velox/exec/PlanNodeStats.h" -#include "velox/exec/tests/utils/Cursor.h" +#include "velox/exec/Cursor.h" #include "velox/exec/tests/utils/HiveConnectorTestBase.h" #include "velox/exec/tests/utils/PlanBuilder.h" #include "velox/vector/fuzzer/VectorFuzzer.h" diff --git a/velox/runner/LocalRunner.h b/velox/runner/LocalRunner.h index f5d3bb5c211f..8ccc64c1d248 100644 --- a/velox/runner/LocalRunner.h +++ b/velox/runner/LocalRunner.h @@ -17,7 +17,7 @@ #include "velox/connectors/Connector.h" #include "velox/exec/Exchange.h" -#include "velox/exec/tests/utils/Cursor.h" +#include "velox/exec/Cursor.h" #include "velox/runner/LocalSchema.h" #include "velox/runner/MultiFragmentPlan.h" #include "velox/runner/Runner.h" diff --git a/velox/runner/Runner.h b/velox/runner/Runner.h index e570a0df1cf2..c4695d516c6b 100644 --- a/velox/runner/Runner.h +++ b/velox/runner/Runner.h @@ -17,7 +17,7 @@ #include "velox/connectors/Connector.h" #include "velox/exec/Exchange.h" -#include "velox/exec/tests/utils/Cursor.h" +#include "velox/exec/Cursor.h" #include "velox/runner/LocalSchema.h" #include "velox/runner/MultiFragmentPlan.h"