Skip to content

Commit

Permalink
Move ValueList to functions/lib/aggregates for Spark reuse
Browse files Browse the repository at this point in the history
  • Loading branch information
liujiayi771 committed Mar 22, 2024
1 parent 1ed8075 commit 4d961e6
Show file tree
Hide file tree
Showing 11 changed files with 21 additions and 11 deletions.
2 changes: 1 addition & 1 deletion velox/exec/tests/SimpleArrayAggAggregate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#include "velox/exec/SimpleAggregateAdapter.h"
#include "velox/expression/FunctionSignature.h"
#include "velox/expression/VectorWriters.h"
#include "velox/functions/prestosql/aggregates/ValueList.h"
#include "velox/functions/lib/aggregates/ValueList.h"

using namespace facebook::velox::exec;

Expand Down
2 changes: 1 addition & 1 deletion velox/functions/lib/aggregates/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
add_library(
velox_functions_aggregates
AverageAggregateBase.cpp CentralMomentsAggregatesBase.cpp
SingleValueAccumulator.cpp ValueSet.cpp)
SingleValueAccumulator.cpp ValueList.cpp ValueSet.cpp)

target_link_libraries(velox_functions_aggregates velox_exec
velox_presto_serializer Folly::folly)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "velox/functions/prestosql/aggregates/ValueList.h"
#include "velox/functions/lib/aggregates/ValueList.h"
#include "velox/exec/ContainerRowSerde.h"

namespace facebook::velox::aggregate {
Expand Down
File renamed without changes.
14 changes: 14 additions & 0 deletions velox/functions/lib/aggregates/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,17 @@
# limitations under the License.

add_subdirectory(utils)

add_executable(velox_functions_aggregates_test ValueListTest.cpp)

add_test(NAME velox_functions_aggregates_test
COMMAND velox_functions_aggregates_test)

target_link_libraries(
velox_functions_aggregates_test
velox_functions_aggregates
velox_functions_test_lib
Folly::folly
gtest
gtest_main
glog::glog)
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "velox/functions/prestosql/aggregates/ValueList.h"
#include <gtest/gtest.h>
#include "velox/functions/lib/aggregates/ValueList.h"
#include "velox/functions/prestosql/tests/utils/FunctionBaseTest.h"
#include "velox/vector/tests/utils/VectorMaker.h"

using namespace facebook::velox;
using namespace facebook::velox::test;
Expand Down
3 changes: 1 addition & 2 deletions velox/functions/prestosql/aggregates/ArrayAggAggregate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@
*/
#include "velox/exec/ContainerRowSerde.h"
#include "velox/expression/FunctionSignature.h"
#include "velox/functions/lib/aggregates/ValueList.h"
#include "velox/functions/prestosql/aggregates/AggregateNames.h"
#include "velox/functions/prestosql/aggregates/ValueList.h"
#include "velox/vector/ComplexVector.h"

namespace facebook::velox::aggregate::prestosql {
namespace {
Expand Down
1 change: 0 additions & 1 deletion velox/functions/prestosql/aggregates/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ add_library(
SetAggregates.cpp
SumAggregate.cpp
SumDataSizeForStatsAggregate.cpp
ValueList.cpp
VarianceAggregates.cpp)

target_link_libraries(
Expand Down
2 changes: 1 addition & 1 deletion velox/functions/prestosql/aggregates/MapAccumulator.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include "velox/common/memory/HashStringAllocator.h"
#include "velox/exec/AddressableNonNullValueList.h"
#include "velox/exec/Strings.h"
#include "velox/functions/prestosql/aggregates/ValueList.h"
#include "velox/functions/lib/aggregates/ValueList.h"
#include "velox/vector/ComplexVector.h"
#include "velox/vector/DecodedVector.h"
#include "velox/vector/FlatVector.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
#include "velox/exec/AddressableNonNullValueList.h"
#include "velox/exec/Aggregate.h"
#include "velox/exec/Strings.h"
#include "velox/functions/lib/aggregates/ValueList.h"
#include "velox/functions/prestosql/aggregates/AggregateNames.h"
#include "velox/functions/prestosql/aggregates/ValueList.h"
#include "velox/vector/FlatVector.h"

namespace facebook::velox::aggregate::prestosql {
Expand Down
1 change: 0 additions & 1 deletion velox/functions/prestosql/aggregates/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ add_executable(
SetUnionTest.cpp
SumDataSizeForStatsTest.cpp
SumTest.cpp
ValueListTest.cpp
VarianceAggregationTest.cpp)

add_test(
Expand Down

0 comments on commit 4d961e6

Please sign in to comment.