MCPcopy Create free account
hub / github.com/LadybugDB/ladybug / createFTableScan

Method createFTableScan

src/processor/map/create_factorized_table_scan.cpp:13–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11namespace processor {
12
13std::unique_ptr<PhysicalOperator> PlanMapper::createFTableScan(const expression_vector& exprs,
14 std::vector<ft_col_idx_t> colIndices, const Schema* schema,
15 std::shared_ptr<FactorizedTable> table, uint64_t maxMorselSize, physical_op_vector_t children) {
16 std::vector<DataPos> outPosV;
17 if (!exprs.empty()) {
18 DASSERT(schema);
19 outPosV = getDataPos(exprs, *schema);
20 }
21 auto function = FTableScan::getFunction();
22 auto bindData =
23 std::make_unique<FTableScanBindData>(table, std::move(colIndices), maxMorselSize);
24 auto info = TableFunctionCallInfo();
25 info.function = *function->copy();
26 info.bindData = std::move(bindData);
27 info.outPosV = std::move(outPosV);
28 auto initInput = TableFuncInitSharedStateInput(info.bindData.get(), executionContext);
29 auto sharedState = info.function.initSharedStateFunc(initInput);
30 auto printInfo = std::make_unique<TableFunctionCallPrintInfo>(function->name, exprs);
31 auto result = std::make_unique<TableFunctionCall>(std::move(info), sharedState, getOperatorID(),
32 std::move(printInfo));
33 for (auto& child : children) {
34 result->addChild(std::move(child));
35 }
36 return result;
37}
38
39std::unique_ptr<PhysicalOperator> PlanMapper::createFTableScan(const expression_vector& exprs,
40 const std::vector<ft_col_idx_t>& colIndices, const Schema* schema,

Callers

nothing calls this directly

Calls 7

getOperatorIDFunction · 0.85
emptyMethod · 0.45
copyMethod · 0.45
getMethod · 0.45
addChildMethod · 0.45

Tested by

no test coverage detected