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

Method evalSpecialForm

bolt/expression/CastExpr.cpp:561–579  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

559}
560
561void CastExpr::evalSpecialForm(
562 const SelectivityVector& rows,
563 EvalCtx& context,
564 VectorPtr& result) {
565 VectorPtr input;
566 inputs_[0]->eval(rows, context, input);
567 auto fromType = inputs_[0]->type();
568 auto toType = std::const_pointer_cast<const Type>(type_);
569
570 inTopLevel = true;
571 if (nullOnFailure()) {
572 ScopedVarSetter holder{context.mutableThrowOnError(), false};
573 apply(rows, input, context, fromType, toType, result);
574 } else {
575 apply(rows, input, context, fromType, toType, result);
576 }
577 // Return 'input' back to the vector pool in 'context' so it can be reused.
578 context.releaseVector(input);
579}
580
581std::string CastExpr::toString(bool recursive) const {
582 std::stringstream out;

Callers

nothing calls this directly

Calls 5

applyFunction · 0.85
mutableThrowOnErrorMethod · 0.80
releaseVectorMethod · 0.80
evalMethod · 0.45
typeMethod · 0.45

Tested by

no test coverage detected