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

Method bindTableFuncScanSource

src/binder/bind/bind_file_scan.cpp:308–324  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

306}
307
308std::unique_ptr<BoundBaseScanSource> Binder::bindTableFuncScanSource(
309 const BaseScanSource& scanSource, const options_t& options,
310 const std::vector<std::string>& columnNames, const std::vector<LogicalType>& columnTypes) {
311 if (!options.empty()) {
312 throw common::BinderException{"No option is supported when copying from table functions."};
313 }
314 auto tableFuncScanSource = scanSource.constPtrCast<TableFuncScanSource>();
315 auto& parsedFuncExpression =
316 tableFuncScanSource->functionExpression->constCast<parser::ParsedFunctionExpression>();
317 auto boundTableFunc = bindTableFunc(parsedFuncExpression.getFunctionName(),
318 *tableFuncScanSource->functionExpression, {} /* yieldVariables */);
319 auto& tableFunc = boundTableFunc.func;
320 DASSERT(tableFunc.has_value());
321 auto info = bindTableScanSourceInfo(*this, *tableFunc, tableFunc->name,
322 std::move(boundTableFunc.bindData), columnNames, columnTypes);
323 return std::make_unique<BoundTableScanSource>(ScanSourceType::OBJECT, std::move(info));
324}
325
326} // namespace binder
327} // namespace lbug

Callers

nothing calls this directly

Calls 3

bindTableScanSourceInfoFunction · 0.85
emptyMethod · 0.45
getFunctionNameMethod · 0.45

Tested by

no test coverage detected