Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
acvictor committed Apr 23, 2024
1 parent 46bb4ac commit e7f5eaf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion velox/core/SimpleFunctionMetadata.h
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,8 @@ class SimpleFunctionMetadata : public ISimpleFunctionMetadata {
builder.returnType(analysis.outputType);
int32_t position = 0;
for (const auto& arg : analysis.argsTypes) {
if (sizeof...(TArgs) > 0 && ConstantChecker::isConstant[position++]) {
if (ConstantChecker::getSize() > 0 &&
ConstantChecker::isConstant[position++]) {
builder.constantArgumentType(arg);
} else {
builder.argumentType(arg);
Expand Down
4 changes: 4 additions & 0 deletions velox/type/SimpleFunctionApi.h
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,10 @@ template <typename... TArgs>
struct ConstantChecker {
static constexpr bool isConstant[sizeof...(TArgs)] = {
isConstantType<TArgs>::value...};

static constexpr size_t getSize() {
return sizeof...(TArgs);
}
};

/// CppToType templates for types introduced above.
Expand Down

0 comments on commit e7f5eaf

Please sign in to comment.