```
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.
#pragma once
#include <DataTypes/IDataType.h>
namespace DB
{
/** Tuple data type.
  * Used as an intermediate result when evaluating expressions.
  * Also can be used as a column - the result of the query execution.
  *
  * Tuple elements can have names.
  * If an element is unnamed, it will have automatically assigned name like '1', '2', '3' corresponding to its position.
  * Manually assigned names must not begin with digit. Names must be unique.
  *
  * All tuples with same size and types of elements are equivalent for expressions, regardless to names of elements.
  */
class DataTypeTuple final : public IDataType
{
private:
    DataTypes elems;
    Strings names;
    bool have_explicit_names;
public:
    static constexpr bool is_parametric = true;
    explicit DataTypeTuple(const DataTypes & elems);
    DataTypeTuple(const DataTypes & elems, const Strings & names);
    TypeIndex getTypeId() const override { return TypeIndex::Tuple; }