Skip to content

Commit

Permalink
Minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
PHILO-HE committed Apr 16, 2024
1 parent e42f086 commit 5e1f752
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions velox/functions/sparksql/String.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ class ConcatWs : public exec::VectorFunction {
// Allocate a string buffer.
auto rawBuffer =
flatResult.getRawStringBufferWithSpace(totalResultBytes, true);
rows.applyToSelected([&](int row) {
rows.applyToSelected([&](auto row) {
const char* start = rawBuffer;
auto isFirst = true;
// For array arg.
Expand Down Expand Up @@ -366,13 +366,13 @@ class ConcatWs : public exec::VectorFunction {
auto numArgs = args.size();
// If separator is NULL, result is NULL.
if (args[0]->isNullAt(0)) {
rows.applyToSelected([&](int row) { result->setNull(row, true); });
rows.applyToSelected([&](auto row) { result->setNull(row, true); });
return;
}
// If only separator (not a NULL) is provided, result is an empty string.
if (numArgs == 1) {
rows.applyToSelected(
[&](int row) { flatResult->setNoCopy(row, StringView("")); });
[&](auto row) { flatResult->setNoCopy(row, StringView("")); });
return;
}
doApply(rows, args, context, *flatResult);
Expand Down

0 comments on commit 5e1f752

Please sign in to comment.