| 156 | } |
| 157 | |
| 158 | bool sanitizeBlock(Block & block, bool throw_if_cannot_create_column) |
| 159 | { |
| 160 | for (auto & col : block) |
| 161 | { |
| 162 | if (!col.column) |
| 163 | { |
| 164 | if (isNotCreatable(col.type->getTypeId())) |
| 165 | { |
| 166 | if (throw_if_cannot_create_column) |
| 167 | throw Exception(ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, "Cannot create column of type {}", col.type->getName()); |
| 168 | |
| 169 | return false; |
| 170 | } |
| 171 | |
| 172 | col.column = col.type->createColumn(); |
| 173 | } |
| 174 | else if (!col.column->empty()) |
| 175 | col.column = col.column->cloneEmpty(); |
| 176 | } |
| 177 | return true; |
| 178 | } |
| 179 | |
| 180 | ExpressionAnalyzerData::ExpressionAnalyzerData() = default; |
| 181 |
no test coverage detected