Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
yma11 committed Apr 1, 2024
1 parent 0bf32da commit 6dcf4a3
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 37 deletions.
2 changes: 1 addition & 1 deletion velox/docs/functions/spark/map.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Map Functions

.. spark:function:: map_from_entries(array(struct(K,V))) -> map(K,V)
Returns a map created from the given array of entries. Keys are not allowed to be null or to contain nulls.
Returns a map created from the given array of entries. Exceptions will be thrown if key is null or contains null.
If null entry exists in the array, return null for this whole array.::

SELECT map_from_entries(array(struct(1, 'a'), struct(2, 'null'))); -- {1 -> 'a', 2 -> 'null'}
Expand Down
34 changes: 1 addition & 33 deletions velox/functions/sparksql/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,39 +14,7 @@

add_executable(
velox_functions_spark_test
ArithmeticTest.cpp
ArrayMaxTest.cpp
ArrayMinTest.cpp
ArraySortTest.cpp
BitwiseTest.cpp
ComparisonsTest.cpp
DateTimeFunctionsTest.cpp
DecimalArithmeticTest.cpp
DecimalCompareTest.cpp
DecimalRoundTest.cpp
DecimalUtilTest.cpp
ElementAtTest.cpp
HashTest.cpp
InTest.cpp
LeastGreatestTest.cpp
MakeDecimalTest.cpp
MakeTimestampTest.cpp
MapTest.cpp
MapFromEntriesTest.cpp
MightContainTest.cpp
MonotonicallyIncreasingIdTest.cpp
RandTest.cpp
RegexFunctionsTest.cpp
SizeTest.cpp
SortArrayTest.cpp
SparkCastExprTest.cpp
SparkPartitionIdTest.cpp
SplitFunctionsTest.cpp
StringTest.cpp
StringToMapTest.cpp
UnscaledValueFunctionTest.cpp
UuidTest.cpp
XxHash64Test.cpp)
MapFromEntriesTest.cpp)

add_test(velox_functions_spark_test velox_functions_spark_test)

Expand Down
3 changes: 0 additions & 3 deletions velox/functions/sparksql/tests/MapFromEntriesTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,9 @@
* limitations under the License.
*/
#include <cstdint>
#include <optional>
#include "velox/common/base/tests/GTestUtils.h"
#include "velox/functions/lib/CheckDuplicateKeys.h"
#include "velox/functions/prestosql/ArrayConstructor.h"
#include "velox/functions/sparksql/tests/SparkFunctionBaseTest.h"
#include "velox/vector/tests/TestingDictionaryArrayElementsFunction.h"

using namespace facebook::velox::test;

Expand Down

0 comments on commit 6dcf4a3

Please sign in to comment.