diff --git a/velox/expression/fuzzer/ExpressionFuzzerTest.cpp b/velox/expression/fuzzer/ExpressionFuzzerTest.cpp index ece09fa4bf4e..cb3a186e5abf 100644 --- a/velox/expression/fuzzer/ExpressionFuzzerTest.cpp +++ b/velox/expression/fuzzer/ExpressionFuzzerTest.cpp @@ -113,7 +113,8 @@ int main(int argc, char** argv) { // from_unixtime can generate timestamps out of the supported range that // make other functions throw VeloxRuntimeErrors. "from_unixtime", - }; + // JSON not supported, Real doesn't match exactly, etc. + "array_join"}; size_t initialSeed = FLAGS_seed == 0 ? std::time(nullptr) : FLAGS_seed; std::unordered_map> diff --git a/velox/functions/prestosql/registration/ArrayFunctionsRegistration.cpp b/velox/functions/prestosql/registration/ArrayFunctionsRegistration.cpp index b2e6f0d23279..a2b8ecf639af 100644 --- a/velox/functions/prestosql/registration/ArrayFunctionsRegistration.cpp +++ b/velox/functions/prestosql/registration/ArrayFunctionsRegistration.cpp @@ -200,6 +200,7 @@ void registerArrayFunctions(const std::string& prefix) { registerArrayJoinFunctions(prefix); registerArrayJoinFunctions(prefix); registerArrayJoinFunctions(prefix); + registerArrayJoinFunctions(prefix); registerFunction>( {prefix + "array_average"}); diff --git a/velox/functions/prestosql/tests/ArrayJoinTest.cpp b/velox/functions/prestosql/tests/ArrayJoinTest.cpp index 0498c4eff5c8..e07e690db222 100644 --- a/velox/functions/prestosql/tests/ArrayJoinTest.cpp +++ b/velox/functions/prestosql/tests/ArrayJoinTest.cpp @@ -268,4 +268,16 @@ TEST_F(ArrayJoinTest, jsonTest) { false, true); } + +TEST_F(ArrayJoinTest, unknownTest) { + testArrayJoinNoReplacement( + {std::nullopt, std::nullopt, std::nullopt}, ","_sv, ""_sv); + + testArrayJoinReplacement( + {std::nullopt, std::nullopt, std::nullopt}, + ","_sv, + "null"_sv, + "null,null,null"_sv); +} + } // namespace