Skip to content

Commit 9b015b2

Browse files
Krishna Paifacebook-github-bot
authored andcommitted
fix: Change array_sort lambda signature
Summary: array_sort lambda signature is defined as function(T, T, bigint) , however Presto has this defined as function(T, T, int) . This causes the side car to fail array_sort queries that use this lambda. See details in [this issue](prestodb/presto#26146). This change changes the signature to match Presto which fixes the side car. Differential Revision: D83353566
1 parent 8875b4d commit 9b015b2

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

velox/functions/lib/ArraySort.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@ std::vector<std::shared_ptr<exec::FunctionSignature>> signatures(
450450
.typeVariable("T")
451451
.returnType("array(T)")
452452
.argumentType("array(T)")
453-
.constantArgumentType("function(T,T,bigint)")
453+
.constantArgumentType("function(T,T,integer)")
454454
.build());
455455
}
456456
return signatures;

velox/functions/prestosql/tests/ArraySortTest.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,7 @@ ArrayVectorPtr ArraySortTest::arrayVector<TestRowType>(
334334
}
335335

336336
void ArraySortTest::SetUp() {
337+
options_.parseIntegerAsBigint = false;
337338
for (const TypeKind type : kSupportedTypes) {
338339
switch (type) {
339340
case TypeKind::BOOLEAN:

0 commit comments

Comments
 (0)