```
SET compile_expressions = 1
SELECT GREATEST(2,0)
```

{
        const IColumn & lhs_column = *block.getByPosition(arguments[0]).column;
        const IColumn & rhs_column = *block.getByPosition(arguments[1]).column;
        bool lhs_is_const = isColumnConst(lhs_column);
        bool rhs_is_const = isColumnConst(rhs_column);
        const ColumnAggregateFunction & lhs = typeid_cast<const ColumnAggregateFunction &>(
            lhs_is_const ? assert_cast<const ColumnConst &>(lhs_column).getDataColumn() : lhs_column);
        const ColumnAggregateFunction & rhs = typeid_cast<const ColumnAggregateFunction &>(
            rhs_is_const ? assert_cast<const ColumnConst &>(rhs_column).getDataColumn() : rhs_column);
        AggregateFunctionPtr function = lhs.getAggregateFunction();
        size_t size = (lhs_is_const && rhs_is_const) ? 1 : input_rows_count;
        auto column_to = ColumnAggregateFunction::create(function);
        column_to->reserve(size);
        for (size_t i = 0; i < size; ++i)
        {
            column_to->insertFrom(lhs.getData()[lhs_is_const ? 0 : i]);
            column_to->insertMergeFrom(rhs.getData()[rhs_is_const ? 0 : i]);
        }
        if (lhs_is_const && rhs_is_const)
            block.getByPosition(result).column = ColumnConst::create(std::move(column_to), input_rows_count);
        else
            block.getByPosition(result).column = std::move(column_to);
    }
    void executeDateTimeIntervalPlusMinus(Block & block, const ColumnNumbers & arguments,