MCPcopy Create free account
hub / github.com/bytedance/bolt / resolveType

Function resolveType

bolt/parse/TypeResolver.cpp:69–86  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

67}
68
69TypePtr resolveType(
70 const std::vector<std::shared_ptr<const core::ITypedExpr>>& inputs,
71 const std::shared_ptr<const core::CallExpr>& expr,
72 bool nullOnFailure) {
73 std::vector<TypePtr> inputTypes;
74 inputTypes.reserve(inputs.size());
75 for (auto& input : inputs) {
76 inputTypes.emplace_back(input->type());
77 }
78
79 if (auto resolvedType = exec::resolveTypeForSpecialForm(
80 expr->getFunctionName(), inputTypes)) {
81 return resolvedType;
82 }
83
84 return resolveScalarFunctionType(
85 expr->getFunctionName(), inputTypes, nullOnFailure);
86}
87
88} // namespace
89

Callers 8

AggregateTypeResolverMethod · 0.85
WindowTypeResolverMethod · 0.85
ConjunctExprMethod · 0.85
SwitchExprMethod · 0.85
resolveTypeMethod · 0.85
resolveTypeMethod · 0.85
resolveTypeMethod · 0.85
CoalesceExprMethod · 0.85

Calls 5

reserveMethod · 0.45
sizeMethod · 0.45
typeMethod · 0.45

Tested by 2

AggregateTypeResolverMethod · 0.68
WindowTypeResolverMethod · 0.68