| 306 | } |
| 307 | |
| 308 | std::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 |
nothing calls this directly
no test coverage detected