| 25 | namespace FunctionEmptyArrayToSingleImpl |
| 26 | { |
| 27 | ColumnPtr executeConst(const ColumnsWithTypeAndName & arguments, const DataTypePtr & result_type, size_t input_rows_count) |
| 28 | { |
| 29 | if (const ColumnConst * const_array = checkAndGetColumnConst<ColumnArray>(arguments[0].column.get())) |
| 30 | { |
| 31 | if (const_array->getValue<Array>().empty()) |
| 32 | { |
| 33 | auto nested_type = typeid_cast<const DataTypeArray &>(*arguments[0].type).getNestedType(); |
| 34 | |
| 35 | return result_type->createColumnConst( |
| 36 | input_rows_count, |
| 37 | Array{nested_type->getDefault()}); |
| 38 | } |
| 39 | return arguments[0].column; |
| 40 | } |
| 41 | return nullptr; |
| 42 | } |
| 43 | |
| 44 | template <typename T, bool nullable> |
| 45 | bool executeNumber( |
no test coverage detected