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

Function resolveWindowType

bolt/exec/tests/utils/PlanBuilder.cpp:1663–1687  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1661}
1662
1663TypePtr resolveWindowType(
1664 const std::string& windowFunctionName,
1665 const std::vector<TypePtr>& inputTypes,
1666 bool nullOnFailure) {
1667 if (auto signatures = exec::getWindowFunctionSignatures(windowFunctionName)) {
1668 for (const auto& signature : signatures.value()) {
1669 exec::SignatureBinder binder(*signature, inputTypes);
1670 if (binder.tryBind()) {
1671 return binder.tryResolveType(signature->returnType());
1672 }
1673 }
1674
1675 if (nullOnFailure) {
1676 return nullptr;
1677 }
1678 throwWindowFunctionSignatureNotSupported(
1679 windowFunctionName, inputTypes, signatures.value());
1680 }
1681
1682 if (nullOnFailure) {
1683 return nullptr;
1684 }
1685 throwWindowFunctionDoesntExist(windowFunctionName);
1686 return nullptr;
1687}
1688
1689class WindowTypeResolver {
1690 public:

Callers 1

resolveTypeMethod · 0.85

Calls 6

valueMethod · 0.45
tryBindMethod · 0.45
tryResolveTypeMethod · 0.45

Tested by

no test coverage detected