Skip to content

Commit

Permalink
Revert PR 9516
Browse files Browse the repository at this point in the history
  • Loading branch information
PHILO-HE committed Jun 7, 2024
1 parent fae7d24 commit 37d8ad6
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 125 deletions.
12 changes: 6 additions & 6 deletions velox/docs/functions/spark/array.rst
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,6 @@ Array Functions
SELECT array_repeat(100, 0); -- []
SELECT array_repeat(100, -1); -- []

.. spark:function:: array_size(array(E)) -> integer
Returns the size of the array. ::
SELECT array_size(array(1, 2, 3)); -- 3
.. spark:function:: array_sort(array(E)) -> array(E)
Returns an array which has the sorted order of the input array(E). The elements of array(E) must
Expand Down Expand Up @@ -173,6 +167,12 @@ Array Functions
if :doc:`spark.legacy_size_of_null <../../configs>` is set to false.
Otherwise, returns -1 for null input.

.. spark:function:: size(array(E), legacyOfNull) -> bigint
Returns the size of the array. Returns null for null input if `legacyOfNull`
is set to false, which is the behavior of Spark's `array_size` function.
Otherwise, returns -1 for null input.

.. spark:function:: sort_array(array(E)) -> array(E)
Returns an array which has the sorted order of the input array. The elements of array must
Expand Down
34 changes: 0 additions & 34 deletions velox/functions/sparksql/ArraySizeFunction.h

This file was deleted.

4 changes: 0 additions & 4 deletions velox/functions/sparksql/Register.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
#include "velox/functions/prestosql/URLFunctions.h"
#include "velox/functions/sparksql/ArrayFlattenFunction.h"
#include "velox/functions/sparksql/ArrayMinMaxFunction.h"
#include "velox/functions/sparksql/ArraySizeFunction.h"
#include "velox/functions/sparksql/ArraySort.h"
#include "velox/functions/sparksql/Bitwise.h"
#include "velox/functions/sparksql/DateTimeFunctions.h"
Expand Down Expand Up @@ -165,9 +164,6 @@ inline void registerArrayMinMaxFunctions(const std::string& prefix) {
void registerFunctions(const std::string& prefix) {
registerAllSpecialFormGeneralFunctions();

registerFunction<sparksql::ArraySizeFunction, int32_t, Array<Any>>(
{prefix + "array_size"});

// Register size functions
registerSize(prefix + "size");

Expand Down
80 changes: 0 additions & 80 deletions velox/functions/sparksql/tests/ArraySizeTest.cpp

This file was deleted.

1 change: 0 additions & 1 deletion velox/functions/sparksql/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ add_executable(
ArrayGetTest.cpp
ArrayMaxTest.cpp
ArrayMinTest.cpp
ArraySizeTest.cpp
ArraySortTest.cpp
ArrayShuffleTest.cpp
ArgGeneratorTest.cpp
Expand Down

0 comments on commit 37d8ad6

Please sign in to comment.