| 37 | } |
| 38 | |
| 39 | static std::unique_ptr<TableFuncBindData> bindFunc(const main::ClientContext* context, |
| 40 | const TableFuncBindInput* input) { |
| 41 | std::vector<std::string> columnNames{WarningConstants::WARNING_TABLE_COLUMN_NAMES.begin(), |
| 42 | WarningConstants::WARNING_TABLE_COLUMN_NAMES.end()}; |
| 43 | std::vector<LogicalType> columnTypes{WarningConstants::WARNING_TABLE_COLUMN_DATA_TYPES.begin(), |
| 44 | WarningConstants::WARNING_TABLE_COLUMN_DATA_TYPES.end()}; |
| 45 | std::vector<processor::WarningInfo> warningInfos; |
| 46 | for (const auto& warning : processor::WarningContext::Get(*context)->getPopulatedWarnings()) { |
| 47 | warningInfos.emplace_back(warning); |
| 48 | } |
| 49 | columnNames = TableFunction::extractYieldVariables(columnNames, input->yieldVariables); |
| 50 | auto columns = input->binder->createVariables(columnNames, columnTypes); |
| 51 | return std::make_unique<ShowWarningsBindData>(std::move(warningInfos), columns, |
| 52 | warningInfos.size()); |
| 53 | } |
| 54 | |
| 55 | function_set ShowWarningsFunction::getFunctionSet() { |
| 56 | function_set functionSet; |
nothing calls this directly
no test coverage detected