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

Function onTopLevelException

bolt/expression/Expr.cpp:705–727  ·  view source on GitHub ↗

Used to generate context for an error occurred while evaluating top-level expression or top-level context for an error occurred while evaluating top-level expression. If FLAGS_bolt_save_input_on_expression_failure_path is not empty, saves the input vector and expression SQL to files in that directory. Returns the output of Expr::toString() for the top-level expression along with the paths of the

Source from the content-addressed store, hash-verified

703 return fmt::format(
704 "Top-level Expression: {}. Input data: {}. SQL expression: {}."
705 " All SQL expressions: {}. ",
706 context->expr()->toString(),
707 context->dataPath(),
708 context->sqlPath(),
709 context->allExprSqlPath());
710}
711
712/// Used to generate context for an error occurred while evaluating
713/// sub-expression. Returns the output of Expr::toString() for the
714/// sub-expression.
715std::string onException(BoltException::Type /*exceptionType*/, void* arg) {
716 return static_cast<Expr*>(arg)->toString();
717}
718} // namespace
719
720void Expr::evalFlatNoNulls(
721 const SelectivityVector& rows,
722 EvalCtx& context,
723 VectorPtr& result,
724 const ExprSet* parentExprSet) {
725 if (shouldEvaluateSharedSubexp()) {
726 evaluateSharedSubexpr(
727 rows,
728 context,
729 result,
730 [&](const SelectivityVector& rows,

Callers

nothing calls this directly

Calls 3

exprMethod · 0.80
persistDataAndSqlMethod · 0.80
toStringMethod · 0.45

Tested by

no test coverage detected