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

Method verifyDataAndSqlPaths

bolt/expression/tests/ExprTest.cpp:293–305  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

291 }
292
293 void verifyDataAndSqlPaths(const BoltException& e, const VectorPtr& data) {
294 auto inputPath = extractInputPath(e.additionalContext());
295 auto copy = restoreVector(inputPath);
296 assertEqualVectors(data, copy);
297
298 auto sqlPath = extractSqlPath(e.additionalContext());
299 auto sql = readSqlFromFile(sqlPath);
300 ASSERT_NO_THROW(compileExpression(sql, asRowType(data->type())));
301
302 auto allSqlsPath = extractAllExprSqlPath(e.additionalContext());
303 auto allSqls = readSqlFromFile(allSqlsPath);
304 ASSERT_NO_THROW(compileMultipleExprs(allSqls, asRowType(data->type())));
305 }
306
307 std::string readSqlFromFile(const std::string& path) {
308 std::ifstream inputFile(path, std::ifstream::binary);

Callers

nothing calls this directly

Calls 5

restoreVectorFunction · 0.85
compileExpressionFunction · 0.85
asRowTypeFunction · 0.85
assertEqualVectorsFunction · 0.50
typeMethod · 0.45

Tested by

no test coverage detected