Creates a new tuple descriptor containing all fields from this tuple descriptor
and all fields from the specified tuple descriptor.
545343
public RelationType joinWith(RelationType other)
    {
        List<Field> fields = ImmutableList.<Field>builder()
                .addAll(this.allFields)
                .addAll(other.allFields)
                .build();

        return new RelationType(fields);
    }
124424
def create_from_tuple(cls, volume):
        
        if isinstance(volume, six.string_types):
            return Volume(target=volume)
        elif len(volume) == 2:
            return Volume(source=volume[0],
                          target=volume[1])
        elif len(volume) == 3:
            return Volume(source=volume[0],
                          target=volume[1],
                          mode=volume[2])
        else:
            logger.debug("Cannot create volume instance from {}."
                         "It has to be tuple of form target x source,target x source,target,mode.".format(volume))
            raise ConuException("Cannot create volume instance.")
342318
def create(type_dict, *type_parameters):
    
    name, values = type_parameters
    assert isinstance(values, (list, tuple))
    for value in values:
      assert isinstance(value, Compatibility.stringy)
    return TypeMetaclass(str(name), (EnumContainer,), { 'VALUES': values })
922000
@Override
	@SuppressWarnings("unchecked")
	public Tuple5<T0, T1, T2, T3, T4> copy() {
		return new Tuple5<>(this.f0,
			this.f1,
			this.f2,
			this.f3,
			this.f4);
	}
1192314
public <T0, T1, T2, T3, T4, T5> SingleOutputStreamOperator<Tuple6<T0, T1, T2, T3, T4, T5>> projectTuple6() {
		TypeInformation<?>[] fTypes = extractFieldTypes(fieldIndexes, dataStream.getType());
		TupleTypeInfo<Tuple6<T0, T1, T2, T3, T4, T5>> tType = new TupleTypeInfo<Tuple6<T0, T1, T2, T3, T4, T5>>(fTypes);

		return dataStream.transform("Projection", tType, new StreamProject<IN, Tuple6<T0, T1, T2, T3, T4, T5>>(fieldIndexes, tType.createSerializer(dataStream.getExecutionConfig())));
	}
824730
@Override
	public Tuple createTuple(EntityKeyMetadata entityKeyMetadata, OperationContext operationContext) {
		return identityColumnAwareGridDialect.createTuple( entityKeyMetadata, operationContext );
	}
904776
private Map<String, ByteBuffer> tupleToKeyMap(Tuple t) throws IOException
    {
        Map<String, ByteBuffer> keys = new HashMap<String, ByteBuffer>();
        for (int i = 0; i < t.size(); i++)
        {
            if (t.getType(i) == DataType.TUPLE)
            {
                Tuple inner = (Tuple) t.get(i);
                if (inner.size() == 2)
                {
                    Object name = inner.get(0);
                    if (name != null)
                    {
                        keys.put(name.toString(), objToBB(inner.get(1)));
                    }
                    else
                        throw new IOException("Key name was empty");
                }
                else
                    throw new IOException("Keys were not in name and value pairs");
            }
            else
            {
                throw new IOException("keys was not a tuple");
            }
        }
        return keys;
    }
452273
public static <T1, T2, T3> Tuple3<T1, T2, T3> tuple(T1 v1, T2 v2, T3 v3) {
        return new Tuple3<>(v1, v2, v3);
    }
777800
private List<Field> allFields(final Class<?> c) {
        List<Field> l = this.fieldsCache.get(c);
        if (l == null) {
            l = new LinkedList<Field>();
            final Field[] fields = c.getDeclaredFields();
            addAll(l, fields);
            Class<?> sc = c;
            while (((sc = sc.getSuperclass()) != Object.class) && (sc != null)) {
                addAll(l, sc.getDeclaredFields());
            }
            this.fieldsCache.putIfAbsent(c, l);
        }
        return l;
    }
662920
public final <T1, T2, T3> Tuple3<T1, T2, T3> concat(Tuple3<T1, T2, T3> tuple) {
        return new Tuple3<>(tuple.v1, tuple.v2, tuple.v3);
    }
1246936
def class_sealer(fields, defaults,
                 base=__base__, make_init_func=make_init_func,
                 initializer=True, comparable=True, printable=True, convertible=False, pass_kwargs=False):
    
    baseclass_name = 'FieldsBase_for__{0}'.format('__'.join(fields))
    if pass_kwargs:
        options = dict(
            header_end=', **__fields_kwargs__):\n',
            super_call_end=', **__fields_kwargs__)\n',
            super_call_pass_allargs=False,
        )
    else:
        options = {}

    if initializer:
        global_namespace, local_namespace = make_init_func(fields, defaults, baseclass_name, **options)

    class FieldsBase(base):
        if initializer:
            __init__ = local_namespace['__init__']

        if comparable:
            def __eq__(self, other):
                if isinstance(other, self.__class__):
                    return tuple(getattr(self, a) for a in fields) == tuple(getattr(other, a) for a in fields)
                else:
                    return NotImplemented

            def __ne__(self, other):
                result = self.__eq__(other)
                if result is NotImplemented:
                    return NotImplemented
                else:
                    return not result

            def __lt__(self, other):
                if isinstance(other, self.__class__):
                    return tuple(getattr(self, a) for a in fields) < tuple(getattr(other, a) for a in fields)
                else:
                    return NotImplemented

            def __le__(self, other):
                if isinstance(other, self.__class__):
                    return tuple(getattr(self, a) for a in fields) <= tuple(getattr(other, a) for a in fields)
                else:
                    return NotImplemented

            def __gt__(self, other):
                if isinstance(other, self.__class__):
                    return tuple(getattr(self, a) for a in fields) > tuple(getattr(other, a) for a in fields)
                else:
                    return NotImplemented

            def __ge__(self, other):
                if isinstance(other, self.__class__):
                    return tuple(getattr(self, a) for a in fields) >= tuple(getattr(other, a) for a in fields)
                else:
                    return NotImplemented

            def __hash__(self):
                return hash(tuple(getattr(self, a) for a in fields))

        if printable:
            def __repr__(self):
                return "{0}({1})".format(
                    self.__class__.__name__,
                    ", ".join("{0}={1}".format(attr, repr(getattr(self, attr))) for attr in fields)
                )
        if convertible:
            @property
            def as_dict(self):
                return dict((attr, getattr(self, attr)) for attr in fields)

            @property
            def as_tuple(self):
                return tuple(getattr(self, attr) for attr in fields)

    if initializer:
        global_namespace[baseclass_name] = FieldsBase
    return FieldsBase
1020340
public static <A, B, C, D> Tuple4<A, B, C, D> of(A a, B b, C c, D d) {
    return new Tuple4<>(a, b, c, d);
  }
1245281
@Override
	@SuppressWarnings("unchecked")
	public Tuple6<T0, T1, T2, T3, T4, T5> copy() {
		return new Tuple6<>(this.f0,
			this.f1,
			this.f2,
			this.f3,
			this.f4,
			this.f5);
	}
428501
def AllFieldsFromDescriptor(self, message_descriptor):
    """"""
    self.Clear()
    for field in message_descriptor.fields:
      self.paths.append(field.name)
141565
def make_from_namedtuple(t, **kwargs):
    
    d = t._asdict()
    d.update(kwargs)
    cls = type(t)
    return cls(**d)
359204
def tuple_sealer(fields, defaults):
    
    baseclass_name = 'FieldsBase_for__{0}'.format('__'.join(fields))
    global_namespace, local_namespace = make_init_func(
        fields, defaults, baseclass_name,
        header_name='__new__',
        header_start='def {func_name}(cls',
        header_end='):\n',
        super_call_start='return tuple.__new__(cls, (',
        super_call_end='))\n',
        super_call_pass_kwargs=False, set_attributes=False,
    )

    def __getnewargs__(self):
        return tuple(self)

    def __repr__(self):
        return "{0}({1})".format(
            self.__class__.__name__,
            ", ".join(a + "=" + repr(getattr(self, a)) for a in fields)
        )

    return type(baseclass_name, (tuple,), dict(
        [(name, property(itemgetter(i))) for i, name in enumerate(fields)],
        __new__=local_namespace['__new__'],
        __getnewargs__=__getnewargs__,
        __repr__=__repr__,
        __slots__=(),
    ))
477953
def tuple_to_schema(tuple_):
    
    schema = []
    for element in tuple_:
        if isinstance(element, (tuple, list)):
            try:
                if isinstance(element[1], six.string_types):
                    schema.append((element[0],))
                else:
                    schema.append(tuple_to_schema(element))
            except IndexError:
                schema.append((element[0],))
        else:
            schema.append(element)
    return tuple(schema)