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

Method getIdxFromNodeName

bolt/substrait/SubstraitParser.cpp:139–155  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

137}
138
139int SubstraitParser::getIdxFromNodeName(const std::string& nodeName) {
140 // Get the position of "_" in the function name.
141 std::size_t pos = nodeName.find("_");
142 if (pos == std::string::npos) {
143 BOLT_FAIL("Invalid node name.");
144 }
145 if (pos == nodeName.size() - 1) {
146 BOLT_FAIL("Invalid node name.");
147 }
148 // Get the column index.
149 std::string colIdx = nodeName.substr(pos + 1);
150 try {
151 return stoi(colIdx);
152 } catch (const std::exception& err) {
153 BOLT_FAIL(err.what());
154 }
155}
156
157const std::string& SubstraitParser::findFunctionSpec(
158 const std::unordered_map<uint64_t, std::string>& functionMap,

Callers 1

TEST_FFunction · 0.80

Calls 3

findMethod · 0.45
sizeMethod · 0.45
whatMethod · 0.45

Tested by 1

TEST_FFunction · 0.64