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

Function exprToChannel

bolt/exec/Operator.cpp:890–902  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

888}
889
890column_index_t exprToChannel(
891 const core::ITypedExpr* expr,
892 const TypePtr& type) {
893 if (auto field = dynamic_cast<const core::FieldAccessTypedExpr*>(expr)) {
894 return type->as<TypeKind::ROW>().getChildIdx(field->name());
895 }
896 if (dynamic_cast<const core::ConstantTypedExpr*>(expr)) {
897 return kConstantChannel;
898 }
899 BOLT_FAIL(
900 "Expression must be field access or constant, got: {}", expr->toString());
901 return 0; // not reached.
902}
903
904std::vector<column_index_t> calculateOutputChannels(
905 const RowTypePtr& sourceOutputType,

Callers 15

createVectorHashersFunction · 0.85
reorderInputChannelsFunction · 0.85
MergeMethod · 0.85
RowComparatorMethod · 0.85
initializeMethod · 0.85
initializeMethod · 0.85
checkKRangeFrameBoundsFunction · 0.85
createWindowFrameMethod · 0.85
createWindowFunctionsMethod · 0.85
OrderByMethod · 0.85

Calls 3

getChildIdxMethod · 0.80
nameMethod · 0.45
toStringMethod · 0.45

Tested by 1