Skip to content

Commit 55fe7bc

Browse files
peterenescufacebook-github-bot
authored andcommitted
revert: Revert array_has_duplicates unit test due to Linux/Ubuntu test mismatch
Summary: New unit test for array_has_duplicates fails on Linux but not Ubuntu. Undoing the addition temporarily while we investigate the issue in case it's a result of added Json functionality Differential Revision: D68845988
1 parent bcc040a commit 55fe7bc

File tree

2 files changed

+0
-41
lines changed

2 files changed

+0
-41
lines changed

velox/functions/prestosql/registration/ArrayFunctionsRegistration.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,6 @@ void registerArrayFunctions(const std::string& prefix) {
317317
registerArrayHasDuplicatesFunctions<int64_t>(prefix);
318318
registerArrayHasDuplicatesFunctions<int128_t>(prefix);
319319
registerArrayHasDuplicatesFunctions<Varchar>(prefix);
320-
registerArrayHasDuplicatesFunctions<Json>(prefix);
321320

322321
registerArrayFrequencyFunctions<bool>(prefix);
323322
registerArrayFrequencyFunctions<int8_t>(prefix);

velox/functions/prestosql/tests/ArrayHasDuplicatesTest.cpp

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
#include <optional>
1818
#include "velox/functions/prestosql/tests/utils/FunctionBaseTest.h"
19-
#include "velox/functions/prestosql/types/JsonType.h"
2019

2120
using namespace facebook::velox;
2221
using namespace facebook::velox::test;
@@ -146,42 +145,3 @@ TEST_F(ArrayHasDuplicatesTest, nullFreeStrings) {
146145
auto expected = makeFlatVector<bool>({false, true, false, true});
147146
testExpr(expected, "array_has_duplicates(C0)", {array});
148147
}
149-
150-
TEST_F(ArrayHasDuplicatesTest, json) {
151-
auto result = evaluate(
152-
"array_has_duplicates(C0)",
153-
makeRowVector({makeNullableArrayVector<StringView>(
154-
{{R"({"key":"value"})", R"({"key":"value"})"}}, ARRAY(JSON()))}));
155-
assertEqualVectors(makeFlatVector<bool>(true), result);
156-
157-
result = evaluate(
158-
"array_has_duplicates(C0)",
159-
makeRowVector({makeNullableArrayVector<StringView>(
160-
{{R"({"key":"value"})"},
161-
{R"({"key":"same_value"})",
162-
R"({"key":"another_value"})",
163-
R"({"key":"same_value"})"},
164-
{std::nullopt, std::nullopt},
165-
{R"({"key":"value"})", R"({"key":"another_value"})"},
166-
{R"({"key":"value"})",
167-
R"({"key":"another_value"})",
168-
R"({"another_key":"value"})"},
169-
{R"({"key": "value\with\backslash"})",
170-
R"({"key": "value\with\backslash"})"},
171-
{R"({"key": "value\nwith\nnewline"})",
172-
R"({"key": "value\nwith\nnewline"})"},
173-
{R"({"key": "value with \u00A9 and \u20AC"})",
174-
R"({"key": "value with \u00A9 and \u20AC"})"},
175-
{R"({"key": "!@#$%^&*()_+-={}:<>?,./~`"})",
176-
R"({"key": "!@#$%^&*()_+-={}:<>?,./~`"})"},
177-
{R"({"key":"value"})",
178-
std::nullopt,
179-
R"({"key":"another_value"})",
180-
R"({"another_key":"value"})",
181-
std::nullopt}},
182-
ARRAY(JSON()))}));
183-
assertEqualVectors(
184-
makeFlatVector<bool>(std::vector<bool>{
185-
{false, true, true, false, false, true, true, true, true, true}}),
186-
result);
187-
}

0 commit comments

Comments
 (0)