Skip to content

Commit 893a974

Browse files
committed
fix issues
1 parent 3c5acae commit 893a974

File tree

2 files changed

+15
-25
lines changed

2 files changed

+15
-25
lines changed

include/substrait/type/Type.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,6 @@ class Map : public TypeBase<TypeKind::kMap> {
394394
const TypePtr valueType_;
395395
};
396396

397-
/// ParameterizedType represent a type in
398397
class ParameterizedTypeBase : public ParameterizedType {
399398
public:
400399
explicit ParameterizedTypeBase(bool nullable = false)

substrait/function/Function.cpp

Lines changed: 15 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -5,29 +5,6 @@
55

66
namespace substrait {
77

8-
namespace {
9-
std::string signatureFor(
10-
const std::string& name,
11-
const std::vector<FunctionArgumentPtr>& arguments) {
12-
std::stringstream ss;
13-
ss << name;
14-
if (!arguments.empty()) {
15-
ss << ":";
16-
for (auto it = arguments.begin(); it != arguments.end(); ++it) {
17-
const auto& typeSign = (*it)->toTypeString();
18-
if (it == arguments.end() - 1) {
19-
ss << typeSign;
20-
} else {
21-
ss << typeSign << "_";
22-
}
23-
}
24-
}
25-
26-
return ss.str();
27-
}
28-
}
29-
30-
318
bool FunctionImplementation::tryMatch(const FunctionSignature& signature) {
329
const auto& actualTypes = signature.arguments;
3310
if (variadic.has_value()) {
@@ -78,7 +55,21 @@ bool FunctionImplementation::tryMatch(const FunctionSignature& signature) {
7855
}
7956

8057
std::string FunctionImplementation::signature() const {
81-
return signatureFor(name, arguments);
58+
std::stringstream ss;
59+
ss << name;
60+
if (!arguments.empty()) {
61+
ss << ":";
62+
for (auto it = arguments.begin(); it != arguments.end(); ++it) {
63+
const auto& typeSign = (*it)->toTypeString();
64+
if (it == arguments.end() - 1) {
65+
ss << typeSign;
66+
} else {
67+
ss << typeSign << "_";
68+
}
69+
}
70+
}
71+
72+
return ss.str();
8273
}
8374

8475
bool AggregateFunctionImplementation::tryMatch(const FunctionSignature& signature) {

0 commit comments

Comments
 (0)