```
select tupleElement(CAST(tuple(1,2),'Tuple(x UInt64, y UInt64)'), 'x') 
-- ok

select tupleElement(CAST(tuple(1,2),'Tuple(x UInt64, y UInt64)'), 'z')

-- fails
-- Code: 10. DB::Exception: Received from localhost:9000. DB::Exception: Tuple doesn't have element with name 'z': While processing tupleElement(CAST((1, 2), 'Tuple(x UInt64, y UInt64)'), 'z'). (NOT_FOUND_COLUMN_IN_BLOCK)
```
Proposal - add the 3rd parameter to the tupleElement function and return it if tuple doesn't have a member.

Why? Tuple comes from object('JSON'), sometimes some fields are missing in some jsons.
{
        Columns array_offsets;
        const auto & first_arg = arguments[0];
        const IDataType * tuple_type = first_arg.type.get();
        const IColumn * tuple_col = first_arg.column.get();
        while (const DataTypeArray * array_type = checkAndGetDataType<DataTypeArray>(tuple_type))
        {
            const ColumnArray * array_col = assert_cast<const ColumnArray *>(tuple_col);
            tuple_type = array_type->getNestedType().get();
            tuple_col = &array_col->getData();
            array_offsets.push_back(array_col->getOffsetsPtr());
        }
        const DataTypeTuple * tuple_type_concrete = checkAndGetDataType<DataTypeTuple>(tuple_type);
        const ColumnTuple * tuple_col_concrete = checkAndGetColumn<ColumnTuple>(tuple_col);
        if (!tuple_type_concrete || !tuple_col_concrete)
            throw Exception("First argument for function " + getName() + " must be tuple or array of tuple.", ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT);
        size_t index = getElementNum(arguments[1].column, *tuple_type_concrete);
        ColumnPtr res = tuple_col_concrete->getColumns()[index];
        
        for (auto it = array_offsets.rbegin(); it != array_offsets.rend(); ++it)
            res = ColumnArray::create(res, *it);
        return res;
    }
private:
    size_t getElementNum(const ColumnPtr & index_column, const DataTypeTuple & tuple) const