diff --git a/velox/dwio/parquet/tests/writer/ParquetWriterTest.cpp b/velox/dwio/parquet/tests/writer/ParquetWriterTest.cpp index 0de6eef55056..c7510d27bff8 100644 --- a/velox/dwio/parquet/tests/writer/ParquetWriterTest.cpp +++ b/velox/dwio/parquet/tests/writer/ParquetWriterTest.cpp @@ -23,8 +23,8 @@ #include "velox/core/QueryCtx.h" #include "velox/dwio/parquet/RegisterParquetWriter.h" // @manual #include "velox/dwio/parquet/tests/ParquetTestBase.h" +#include "velox/exec/Cursor.h" #include "velox/exec/tests/utils/AssertQueryBuilder.h" -#include "velox/exec/tests/utils/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 25882fd44f14..80bd83d2084e 100644 --- a/velox/exec/CMakeLists.txt +++ b/velox/exec/CMakeLists.txt @@ -110,6 +110,22 @@ 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 2aea378035ee..c4333312474d 100644 --- a/velox/exec/tests/DriverTest.cpp +++ b/velox/exec/tests/DriverTest.cpp @@ -21,11 +21,11 @@ #include "velox/common/base/tests/GTestUtils.h" #include "velox/common/testutil/TestValue.h" #include "velox/dwio/common/tests/utils/BatchMaker.h" +#include "velox/exec/Cursor.h" #include "velox/exec/PlanNodeStats.h" #include "velox/exec/Values.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/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..0a7fc85cef71 100644 --- a/velox/exec/tests/GroupedExecutionTest.cpp +++ b/velox/exec/tests/GroupedExecutionTest.cpp @@ -17,9 +17,9 @@ #include "velox/common/base/tests/GTestUtils.h" #include "velox/common/memory/MemoryArbitrator.h" +#include "velox/exec/Cursor.h" #include "velox/exec/OutputBufferManager.h" #include "velox/exec/PlanNodeStats.h" -#include "velox/exec/tests/utils/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 470b9026b403..d985f1a60e57 100644 --- a/velox/exec/tests/HashJoinTest.cpp +++ b/velox/exec/tests/HashJoinTest.cpp @@ -21,13 +21,13 @@ #include "velox/common/base/tests/GTestUtils.h" #include "velox/common/testutil/TestValue.h" #include "velox/dwio/common/tests/utils/BatchMaker.h" +#include "velox/exec/Cursor.h" #include "velox/exec/HashBuild.h" #include "velox/exec/HashJoinBridge.h" #include "velox/exec/OperatorUtils.h" #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/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 0ebd1222c988..d8292880caee 100644 --- a/velox/exec/tests/TableScanTest.cpp +++ b/velox/exec/tests/TableScanTest.cpp @@ -34,12 +34,12 @@ #include "velox/connectors/hive/HivePartitionFunction.h" #include "velox/dwio/common/CacheInputStream.h" #include "velox/dwio/common/tests/utils/DataFiles.h" +#include "velox/exec/Cursor.h" #include "velox/exec/Exchange.h" #include "velox/exec/OutputBufferManager.h" #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/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 0dc1fd057bc7..dc19adb84a29 100644 --- a/velox/exec/tests/TaskTest.cpp +++ b/velox/exec/tests/TaskTest.cpp @@ -24,11 +24,11 @@ #include "velox/common/memory/tests/SharedArbitratorTestUtil.h" #include "velox/common/testutil/TestValue.h" #include "velox/connectors/hive/HiveConnectorSplit.h" +#include "velox/exec/Cursor.h" #include "velox/exec/OutputBufferManager.h" #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/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 294493367012..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 @@ -51,6 +35,7 @@ add_library( target_link_libraries( velox_exec_test_lib velox_vector_test_lib + velox_vector_fuzzer velox_temp_path velox_cursor velox_core diff --git a/velox/exec/tests/utils/QueryAssertions.cpp b/velox/exec/tests/utils/QueryAssertions.cpp index c13a9a049c34..2e274da5ec60 100644 --- a/velox/exec/tests/utils/QueryAssertions.cpp +++ b/velox/exec/tests/utils/QueryAssertions.cpp @@ -19,8 +19,8 @@ #include "duckdb/common/types.hpp" // @manual #include "velox/duckdb/conversion/DuckConversion.h" +#include "velox/exec/Cursor.h" #include "velox/exec/tests/utils/ArbitratorTestUtil.h" -#include "velox/exec/tests/utils/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 81bfc036b7f1..ff81add3a2a8 100644 --- a/velox/exec/tests/utils/QueryAssertions.h +++ b/velox/exec/tests/utils/QueryAssertions.h @@ -18,8 +18,8 @@ #include "velox/common/testutil/TestValue.h" #include "velox/core/PlanNode.h" +#include "velox/exec/Cursor.h" #include "velox/exec/Operator.h" -#include "velox/exec/tests/utils/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..f3eb9f149a80 100644 --- a/velox/functions/prestosql/aggregates/benchmarks/TwoStringKeys.cpp +++ b/velox/functions/prestosql/aggregates/benchmarks/TwoStringKeys.cpp @@ -17,8 +17,8 @@ #include #include +#include "velox/exec/Cursor.h" #include "velox/exec/PlanNodeStats.h" -#include "velox/exec/tests/utils/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..3d69a07da8ab 100644 --- a/velox/runner/LocalRunner.h +++ b/velox/runner/LocalRunner.h @@ -16,8 +16,8 @@ #pragma once #include "velox/connectors/Connector.h" +#include "velox/exec/Cursor.h" #include "velox/exec/Exchange.h" -#include "velox/exec/tests/utils/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..88707e87f948 100644 --- a/velox/runner/Runner.h +++ b/velox/runner/Runner.h @@ -16,8 +16,8 @@ #pragma once #include "velox/connectors/Connector.h" +#include "velox/exec/Cursor.h" #include "velox/exec/Exchange.h" -#include "velox/exec/tests/utils/Cursor.h" #include "velox/runner/LocalSchema.h" #include "velox/runner/MultiFragmentPlan.h"