Default behavior is to write each value in the tuple as a key:value pair
in the Cassandra row.

@param tuple
@return
968832
@Override
    public Map<String, String> mapToColumns(Tuple tuple) {
        Fields fields = tuple.getFields();
        Map<String, String> columns = new HashMap<String, String>();
        for (int i = 0; i < fields.size(); i++) {
            String name = fields.get(i);
            Object value = tuple.getValueByField(name);
            columns.put(name, (value != null ? value.toString() : ""));
        }
        return columns;
    }
945471
public final <T1> Tuple1<T1> concat(Tuple1<T1> tuple) {
        return new Tuple1<>(tuple.v1);
    }
1123471
public static Point2d convert(Tuple2D<?> tuple) {
		if (tuple instanceof Point2d) {
			return (Point2d) tuple;
		}
		return new Point2d(tuple.getX(), tuple.getY());
	}
1194553
@Override
  public KeyValue<K, Iterator<V>> next() throws NoSuchElementException {
    if (combineValues) {
      skipLeftoverItems();
    }
    PeekingInputReader<KeyValue<ByteBuffer, ? extends Iterable<V>>> reader =
        lowestReaderQueue.remove();
    KeyValue<ByteBuffer, ? extends Iterable<V>> lowest = reader.next();
    ByteBuffer lowestKey = lowest.getKey();
    addReaderToQueueIfNotEmpty(reader);
    lastKey = SerializableValue.of(getByteBufferMarshaller(), lowestKey);
    if (combineValues) {
      CombiningReader values = new CombiningReader(lowestKey, lowest.getValue());
      return new KeyValue<K, Iterator<V>>(keyMarshaller.fromBytes(lowestKey.slice()), values);
    } else {
      return new KeyValue<>(keyMarshaller.fromBytes(lowestKey.slice()),
          lowest.getValue().iterator());
    }
  }
176004
public final <T2> Tuple2<T1, T2> concat(T2 value) {
        return new Tuple2<>(v1, value);
    }
1202657
private static void setBasicValue(Object entity, Field member, String columnName, UDTValue row,
            CassandraType dataType, MetamodelImpl metamodel)
    {
    	if(row.isNull(columnName)){
        	return;
        }
        Object retVal = null;
        switch (dataType)
        {
        case BYTES:
            // case CUSTOM:
            retVal = row.getBytes(columnName);
            if (retVal != null)
            {
                setFieldValue(entity, member, ((ByteBuffer) retVal).array());
            }
            break;

        case BOOLEAN:
            retVal = row.getBool(columnName);
            setFieldValue(entity, member, retVal);
            break;

        case BIGINT:
            // bigints in embeddables and element collections are mapped/defined
            // by Long
        case LONG:
        case COUNTER:
            retVal = row.getLong(columnName);
            setFieldValue(entity, member, retVal);
            break;

        case DECIMAL:
            retVal = row.getDecimal(columnName);
            setFieldValue(entity, member, retVal);
            break;

        case DOUBLE:
            retVal = row.getDouble(columnName);
            setFieldValue(entity, member, retVal);
            break;

        case FLOAT:
            retVal = row.getFloat(columnName);
            setFieldValue(entity, member, retVal);
            break;

        case INET:
            retVal = row.getInet(columnName);
            setFieldValue(entity, member, retVal);
            break;

        case INT:
            retVal = row.getInt(columnName);
            retVal = setIntValue(member, retVal);
            setFieldValue(entity, member, retVal);
            break;

        case ASCII:
        case STRING:
        case CHARACTER:
            try
            {
                row.getBytes(columnName);
            }
            catch (Exception e)
            {
                // do nothing
            }
            retVal = row.getString(columnName);
            retVal = setTextValue(entity, member, retVal);
            setFieldValue(entity, member, retVal);
            break;

        case TIMESTAMP:
            retVal = row.getTimestamp(columnName);
            if (retVal != null && member != null)
                retVal = CassandraDataTranslator.decompose(member.getType(),
                        ByteBufferUtil.bytes(((Date) retVal).getTime()).array(), true);
            setFieldValue(entity, member, retVal);
            break;

        case UUID:
            // case TIMEUUID:
            retVal = row.getUUID(columnName);
            setFieldValue(entity, member, retVal);
            break;

        case LIST:
            Class listAttributeTypeClass = PropertyAccessorHelper.getGenericClass(member);
            Class listClazz = null;
            boolean isElementCollectionList = false;
            if (listAttributeTypeClass.isAssignableFrom(byte[].class))
            {

                listClazz = ByteBuffer.class;
            }
            else if (listAttributeTypeClass.isAnnotationPresent(Embeddable.class))
            {
                isElementCollectionList = true;
                listClazz = UDTValue.class;
            }
            else
            {
                listClazz = listAttributeTypeClass;
            }
            retVal = row.getList(columnName, listClazz);
            Collection resultList = new ArrayList();
            if (isElementCollectionList)
            {
                Iterator collectionItems = ((Collection) retVal).iterator();
                while (collectionItems.hasNext())
                {
                    resultList.add(setUDTValue(entity, listAttributeTypeClass, (UDTValue) collectionItems.next(),
                            metamodel));
                }
            }

            if (retVal != null && !((List) retVal).isEmpty() && !isElementCollectionList)
            {
                if (listAttributeTypeClass.isAssignableFrom(byte[].class))
                {
                    setFieldValue(entity, member, CassandraDataTranslator.marshalCollection(BytesType.class,
                            (Collection) retVal, listAttributeTypeClass, ArrayList.class));
                }
                else
                {
                    Iterator collectionItems = ((Collection) retVal).iterator();
                    while (collectionItems.hasNext())
                    {
                        resultList.add(collectionItems.next());
                    }
                    setFieldValue(entity, member, resultList);
                }

            }
            else if (retVal != null && !((Collection) retVal).isEmpty())
            {
                setFieldValue(entity, member, resultList);
            }
            break;

        case SET:
            Class setAttributeTypeClass = PropertyAccessorHelper.getGenericClass(member);
            Class setClazz = null;
            boolean isElementCollectionSet = false;
            if (setAttributeTypeClass.isAssignableFrom(byte[].class))
            {

                setClazz = ByteBuffer.class;
            }
            else if (setAttributeTypeClass.isAnnotationPresent(Embeddable.class))
            {
                isElementCollectionSet = true;
                setClazz = UDTValue.class;
            }
            else
            {
                setClazz = setAttributeTypeClass;
            }
            retVal = row.getSet(columnName, setClazz);
            Collection resultSet = new HashSet();
            if (isElementCollectionSet)
            {
                Iterator collectionItems = ((Collection) retVal).iterator();
                while (collectionItems.hasNext())
                {
                    resultSet.add(setUDTValue(entity, setAttributeTypeClass, (UDTValue) collectionItems.next(),
                            metamodel));
                }
            }

            if (retVal != null && !((Set) retVal).isEmpty() && !isElementCollectionSet)
            {
                if (setAttributeTypeClass.isAssignableFrom(byte[].class))
                {
                    setFieldValue(entity, member, CassandraDataTranslator.marshalCollection(BytesType.class,
                            (Collection) retVal, setAttributeTypeClass, HashSet.class));
                }
                else
                {
                    Iterator collectionItems = ((Collection) retVal).iterator();
                    while (collectionItems.hasNext())
                    {
                        resultSet.add(collectionItems.next());
                    }
                    setFieldValue(entity, member, resultSet);
                }
            }
            else if (retVal != null && !((Collection) retVal).isEmpty())
            {
                setFieldValue(entity, member, resultSet);
            }
            break;
        /*
         * ASCII, BIGINT, BLOB, BOOLEAN, COUNTER, DECIMAL, DOUBLE, FLOAT, INET,
         * INT, TEXT, TIMESTAMP, UUID, VARCHAR, VARINT, TIMEUUID, LIST, SET,
         * MAP, CUSTOM;
         */
        case MAP:
            List<Class<?>> mapGenericClasses = PropertyAccessorHelper.getGenericClasses(member);

            Class keyClass = CassandraValidationClassMapper.getValidationClassInstance(mapGenericClasses.get(0), true);
            Class valueClass = CassandraValidationClassMapper
                    .getValidationClassInstance(mapGenericClasses.get(1), true);
            Class mapValueClazz = null;
            boolean isElementCollectionMap = false;
            if (mapGenericClasses.get(1).isAssignableFrom(byte[].class))
            {

                mapValueClazz = ByteBuffer.class;
            }
            else if (mapGenericClasses.get(1).isAnnotationPresent(Embeddable.class))
            {
                isElementCollectionMap = true;
                mapValueClazz = UDTValue.class;
            }
            else
            {
                mapValueClazz = mapGenericClasses.get(1);
            }
            retVal = row.getMap(columnName, mapGenericClasses.get(0).isAssignableFrom(byte[].class) ? ByteBuffer.class
                    : mapGenericClasses.get(0), mapValueClazz);

            Map resultMap = new HashMap();

            if (isElementCollectionMap)
            {
                Iterator keys = ((Map) retVal).keySet().iterator();
                while (keys.hasNext())
                {
                    Object keyValue = keys.next();
                    resultMap.put(
                            keyValue,
                            setUDTValue(entity, mapGenericClasses.get(1), (UDTValue) ((Map) retVal).get(keyValue),
                                    metamodel));
                }
            }

            boolean isByteBuffer = mapGenericClasses.get(0).isAssignableFrom(byte[].class)
                    || mapGenericClasses.get(1).isAssignableFrom(byte[].class);

            // set the values.
            if (retVal != null && !((Map) retVal).isEmpty() && !isElementCollectionMap)
            {
                if (isByteBuffer)
                {
                    setFieldValue(entity, member,
                            CassandraDataTranslator.marshalMap(mapGenericClasses, keyClass, valueClass, (Map) retVal));
                }
                else
                {
                    Iterator keys = ((Map) retVal).keySet().iterator();
                    while (keys.hasNext())
                    {
                        Object keyValue = keys.next();
                        resultMap.put(keyValue, ((Map) retVal).get(keyValue));
                    }
                    setFieldValue(entity, member, resultMap);
                }
            }
            else if (retVal != null && !((Map) retVal).isEmpty())
            {
                setFieldValue(entity, member, resultMap);
            }
            break;
        }

    }
929306
private void setMapTupleValues(Tuple tuple, int position, Object value, AbstractType<?> validator) throws ExecException
    {
        AbstractType<?> keyValidator = ((MapType<?, ?>) validator).getKeysType();
        AbstractType<?> valueValidator = ((MapType<?, ?>) validator).getValuesType();

        int i = 0;
        Tuple innerTuple = TupleFactory.getInstance().newTuple(((Map<?,?>) value).size());
        for(Map.Entry<?,?> entry :  ((Map<Object, Object>)value).entrySet())
        {
            Tuple mapEntryTuple = TupleFactory.getInstance().newTuple(2);
            setTupleValue(mapEntryTuple, 0, cassandraToPigData(entry.getKey(), keyValidator), keyValidator);
            setTupleValue(mapEntryTuple, 1, cassandraToPigData(entry.getValue(), valueValidator), valueValidator);
            innerTuple.set(i, mapEntryTuple);
            i++;
        }
        tuple.set(position, innerTuple);
    }
1006840
@Override
	@SuppressWarnings("unchecked")
	public Tuple4<T0, T1, T2, T3> copy() {
		return new Tuple4<>(this.f0,
			this.f1,
			this.f2,
			this.f3);
	}
462092
protected EntityKey getEntityKey(Tuple tuple, AssociatedEntityKeyMetadata associatedEntityKeyMetadata) {
		Object[] columnValues = new Object[ associatedEntityKeyMetadata.getAssociationKeyColumns().length];
		int i = 0;

		for ( String associationKeyColumn : associatedEntityKeyMetadata.getAssociationKeyColumns() ) {
			columnValues[i] = tuple.get( associationKeyColumn );
			i++;
		}

		return new EntityKey( associatedEntityKeyMetadata.getEntityKeyMetadata(), columnValues );
	}
1364881
public final <T1, T2> Tuple2<T1, T2> concat(Tuple2<T1, T2> tuple) {
        return new Tuple2<>(tuple.v1, tuple.v2);
    }
544040
@Override
    public RowQuery<K, C> getKey(final K rowKey) {
        return new AbstractRowQueryImpl<K, C>(columnFamily.getColumnSerializer()) {
            private boolean firstPage = true;

            @Override
            public ColumnQuery<C> getColumn(final C column) {
                return new ColumnQuery<C>() {
                    @Override
                    public OperationResult<Column<C>> execute() throws ConnectionException {
                        return connectionPool.executeWithFailover(new AbstractKeyspaceOperationImpl<Column<C>>(
                                tracerFactory.newTracer(CassandraOperationType.GET_COLUMN, columnFamily), pinnedHost,
                                keyspace.getKeyspaceName()) {
                            @Override
                            public Column<C> internalExecute(Client client, ConnectionContext context) throws Exception {
                                ColumnOrSuperColumn cosc = client.get(
                                        columnFamily.getKeySerializer().toByteBuffer(rowKey),
                                        new org.apache.cassandra.thrift.ColumnPath().setColumn_family(
                                                columnFamily.getName()).setColumn(
                                                columnFamily.getColumnSerializer().toByteBuffer(column)),
                                        ThriftConverter.ToThriftConsistencyLevel(consistencyLevel));
                                if (cosc.isSetColumn()) {
                                    org.apache.cassandra.thrift.Column c = cosc.getColumn();
                                    return new ThriftColumnImpl<C>(columnFamily.getColumnSerializer().fromBytes(
                                            c.getName()), c);
                                }
                                else if (cosc.isSetSuper_column()) {
                                    // TODO: Super columns
                                    // should be deprecated
                                    SuperColumn sc = cosc.getSuper_column();
                                    return new ThriftSuperColumnImpl<C>(columnFamily.getColumnSerializer().fromBytes(
                                            sc.getName()), sc);
                                }
                                else if (cosc.isSetCounter_column()) {
                                    org.apache.cassandra.thrift.CounterColumn c = cosc.getCounter_column();
                                    return new ThriftCounterColumnImpl<C>(columnFamily.getColumnSerializer().fromBytes(
                                            c.getName()), c);
                                }
                                else if (cosc.isSetCounter_super_column()) {
                                    // TODO: Super columns
                                    // should be deprecated
                                    CounterSuperColumn sc = cosc.getCounter_super_column();
                                    return new ThriftCounterSuperColumnImpl<C>(columnFamily.getColumnSerializer()
                                            .fromBytes(sc.getName()), sc);
                                }
                                else {
                                    throw new RuntimeException("Unknown column type in response");
                                }
                            }

                            @Override
                            public ByteBuffer getRowKey() {
                                return columnFamily.getKeySerializer().toByteBuffer(rowKey);
                            }
                        }, retry);
                    }

                    @Override
                    public ListenableFuture<OperationResult<Column<C>>> executeAsync() throws ConnectionException {
                        return executor.submit(new Callable<OperationResult<Column<C>>>() {
                            @Override
                            public OperationResult<Column<C>> call() throws Exception {
                                return execute();
                            }
                        });
                    }
                };
            }

            @Override
            public OperationResult<ColumnList<C>> execute() throws ConnectionException {
                return connectionPool.executeWithFailover(
                        new AbstractKeyspaceOperationImpl<ColumnList<C>>(tracerFactory.newTracer(
                                CassandraOperationType.GET_ROW, columnFamily), pinnedHost, keyspace.getKeyspaceName()) {

                            @Override
                            public ColumnList<C> execute(Client client, ConnectionContext context) throws ConnectionException {
                                if (isPaginating && paginateNoMore) {
                                    return new EmptyColumnList<C>();
                                }

                                return super.execute(client, context);
                            }

                            @Override
                            public ColumnList<C> internalExecute(Client client, ConnectionContext context) throws Exception {
                                List<ColumnOrSuperColumn> columnList = client.get_slice(columnFamily.getKeySerializer()
                                        .toByteBuffer(rowKey), new ColumnParent().setColumn_family(columnFamily
                                        .getName()), predicate, ThriftConverter
                                        .ToThriftConsistencyLevel(consistencyLevel));

                                // Special handling for pagination
                                if (isPaginating && predicate.isSetSlice_range()) {
                                    // Did we reach the end of the query.
                                    if (columnList.size() != predicate.getSlice_range().getCount()) {
                                        paginateNoMore = true;
                                    }

                                    // If this is the first page then adjust the
                                    // count so we fetch one extra column
                                    // that will later be dropped
                                    if (firstPage) {
                                        firstPage = false;
                                        if (predicate.getSlice_range().getCount() != Integer.MAX_VALUE)
                                            predicate.getSlice_range().setCount(predicate.getSlice_range().getCount() + 1);
                                    }
                                    else {
                                        if (!columnList.isEmpty())
                                            columnList.remove(0);
                                    }

                                    // Set the start column for the next page to
                                    // the last column of this page.
                                    // We will discard this column later.
                                    if (!columnList.isEmpty()) {
                                        ColumnOrSuperColumn last = Iterables.getLast(columnList);
                                        if (last.isSetColumn()) {
                                            predicate.getSlice_range().setStart(last.getColumn().getName());
                                        } else if (last.isSetCounter_column()) {
                                            predicate.getSlice_range().setStart(last.getCounter_column().getName());
                                        } else if (last.isSetSuper_column()) {
                                            // TODO: Super columns
                                            // should be deprecated
                                            predicate.getSlice_range().setStart(last.getSuper_column().getName());
                                        } else if (last.isSetCounter_super_column()) {
                                            // TODO: Super columns
                                            // should be deprecated
                                            predicate.getSlice_range().setStart(last.getCounter_super_column().getName());
                                        }
                                    }
                                }
                                ColumnList<C> result = new ThriftColumnOrSuperColumnListImpl<C>(columnList,
                                        columnFamily.getColumnSerializer());
                                return result;
                            }

                            @Override
                            public ByteBuffer getRowKey() {
                                return columnFamily.getKeySerializer().toByteBuffer(rowKey);
                            }
                        }, retry);
            }

            @Override
            public ColumnCountQuery getCount() {
                return new ColumnCountQuery() {
                    @Override
                    public OperationResult<Integer> execute() throws ConnectionException {
                        return connectionPool.executeWithFailover(new AbstractKeyspaceOperationImpl<Integer>(
                                tracerFactory.newTracer(CassandraOperationType.GET_COLUMN_COUNT, columnFamily),
                                pinnedHost, keyspace.getKeyspaceName()) {
                            @Override
                            public Integer internalExecute(Client client, ConnectionContext context) throws Exception {
                                return client.get_count(columnFamily.getKeySerializer().toByteBuffer(rowKey),
                                        new ColumnParent().setColumn_family(columnFamily.getName()), predicate,
                                        ThriftConverter.ToThriftConsistencyLevel(consistencyLevel));
                            }

                            @Override
                            public ByteBuffer getRowKey() {
                                return columnFamily.getKeySerializer().toByteBuffer(rowKey);
                            }
                        }, retry);
                    }

                    @Override
                    public ListenableFuture<OperationResult<Integer>> executeAsync() throws ConnectionException {
                        return executor.submit(new Callable<OperationResult<Integer>>() {
                            @Override
                            public OperationResult<Integer> call() throws Exception {
                                return execute();
                            }
                        });
                    }
                };
            }

            @Override
            public ListenableFuture<OperationResult<ColumnList<C>>> executeAsync() throws ConnectionException {
                return executor.submit(new Callable<OperationResult<ColumnList<C>>>() {
                    @Override
                    public OperationResult<ColumnList<C>> call() throws Exception {
                        return execute();
                    }
                });
            }

            @Override
            public RowCopier<K, C> copyTo(final ColumnFamily<K, C> otherColumnFamily, final K otherRowKey) {
                return new RowCopier<K, C>() {
                    private boolean useOriginalTimestamp = true;

                    @Override
                    public OperationResult<Void> execute() throws ConnectionException {
                        return connectionPool.executeWithFailover(
                                new AbstractKeyspaceOperationImpl<Void>(tracerFactory.newTracer(
                                        CassandraOperationType.COPY_TO, columnFamily), pinnedHost, keyspace
                                        .getKeyspaceName()) {
                                    @Override
                                    public Void internalExecute(Client client, ConnectionContext context) throws Exception {

                                        long currentTime = keyspace.getConfig().getClock().getCurrentTime();

                                        List<ColumnOrSuperColumn> columnList = client.get_slice(columnFamily
                                                .getKeySerializer().toByteBuffer(rowKey), new ColumnParent()
                                                .setColumn_family(columnFamily.getName()), predicate, ThriftConverter
                                                .ToThriftConsistencyLevel(consistencyLevel));

                                        // Create mutation list from columns in
                                        // the response
                                        List<Mutation> mutationList = new ArrayList<Mutation>();
                                        for (ColumnOrSuperColumn sosc : columnList) {
                                            ColumnOrSuperColumn cosc;

                                            if (sosc.isSetColumn()) {
                                                cosc = new ColumnOrSuperColumn().setColumn(sosc.getColumn());
                                                if (!useOriginalTimestamp)
                                                    cosc.getColumn().setTimestamp(currentTime);
                                            }
                                            else if (sosc.isSetSuper_column()) {
                                                cosc = new ColumnOrSuperColumn().setSuper_column(sosc.getSuper_column());
                                                if (!useOriginalTimestamp) {
                                                    for (org.apache.cassandra.thrift.Column subColumn : sosc.getSuper_column().getColumns()) {
                                                        subColumn.setTimestamp(currentTime);
                                                        subColumn.setTimestamp(currentTime);
                                                    }
                                                }
                                            }
                                            else if (sosc.isSetCounter_column()) {
                                                cosc = new ColumnOrSuperColumn().setCounter_column(sosc.getCounter_column());
                                            }
                                            else if (sosc.isSetCounter_super_column()) {
                                                cosc = new ColumnOrSuperColumn().setCounter_super_column(sosc.getCounter_super_column());
                                            }
                                            else {
                                                continue;
                                            }

                                            mutationList.add(new Mutation().setColumn_or_supercolumn(cosc));
                                        }

                                        // Create mutation map
                                        Map<ByteBuffer, Map<String, List<Mutation>>> mutationMap = new HashMap<ByteBuffer, Map<String, List<Mutation>>>();
                                        HashMap<String, List<Mutation>> cfmap = new HashMap<String, List<Mutation>>();
                                        cfmap.put(otherColumnFamily.getName(), mutationList);
                                        mutationMap.put(columnFamily.getKeySerializer().toByteBuffer(otherRowKey),
                                                cfmap);

                                        // Execute the mutation
                                        client.batch_mutate(mutationMap,
                                                ThriftConverter.ToThriftConsistencyLevel(consistencyLevel));
                                        return null;
                                    }
                                }, retry);
                    }

                    @Override
                    public ListenableFuture<OperationResult<Void>> executeAsync() throws ConnectionException {
                        return executor.submit(new Callable<OperationResult<Void>>() {
                            @Override
                            public OperationResult<Void> call() throws Exception {
                                return execute();
                            }
                        });
                    }

                    @Override
                    public RowCopier<K, C> withOriginalTimestamp(boolean useOriginalTimestamp) {
                        this.useOriginalTimestamp = useOriginalTimestamp;
                        return this;
                    }
                };
            }
        };
    }
993019
private void writeColumnsFromTuple(ByteBuffer key, Tuple t, int offset) throws IOException
    {
        ArrayList<Mutation> mutationList = new ArrayList<Mutation>();
        for (int i = offset; i < t.size(); i++)
        {
            if (t.getType(i) == DataType.BAG)
                writeColumnsFromBag(key, (DataBag) t.get(i));
            else if (t.getType(i) == DataType.TUPLE)
            {
                Tuple inner = (Tuple) t.get(i);
                if (inner.size() > 0) // may be empty, for an indexed column that wasn't present
                    mutationList.add(mutationFromTuple(inner));
            }
            else if (!usePartitionFilter)
            {
                throw new IOException("Output type was not a bag or a tuple");
            }
        }
        if (mutationList.size() > 0)
            writeMutations(key, mutationList);
    }
813286
protected void writeOnceTuple( TupleRef tuple)
    {
    writer_
      .element( ONCE_TAG)
      .content( () -> toStream( tuple.getVarBindings()).forEach( this::writeVarBinding))
      .write();
    }
229619
@SuppressWarnings("unchecked")
    public CassandraJavaPairRDD<K, V> withAscOrder() {
        CassandraRDD<Tuple2<K, V>> newRDD = rdd().withAscOrder();
        return wrap(newRDD);
    }
195661
public boolean setNextKeyValue(Text key, Row value)
            throws IOException {
        if (!_rows.hasNext()) {
            Closeables.close(this, true);
            return false;
        }

        try {
            Map<String, Object> content = _rows.next();
            key.set(Coordinate.fromJson(content).toString());
            value.set(content);
            _rowsRead += 1;
        } catch (Exception e) {
            for (Throwable cause : Throwables.getCausalChain(e)) {
                Throwables.propagateIfInstanceOf(cause, IOException.class);
            }
            throw new IOException("Failed to read next row", e);
        }
        return true;
    }
710229
@Override
    public CompletableFuture<Tuple2<List<String>, ExecutionInfo>> getListJSONAsyncWithStats() {
        final RuntimeEngine rte = getRte();
        final CassandraOptions options = getOptions();

        final StatementWrapper statementWrapper = getInternalBoundStatementWrapper();

        if (LOGGER.isTraceEnabled()) {
            LOGGER.trace(format("Select async with execution info : %s",
                    statementWrapper.getBoundStatement().preparedStatement().getQueryString()));
        }
        CompletableFuture<ResultSet> futureRS = rte.execute(statementWrapper);

        return futureRS
                .thenApply(options::resultSetAsyncListener)
                .thenApply(x -> statementWrapper.logReturnResults(x, options.computeMaxDisplayedResults(rte.configContext)))
                .thenApply(statementWrapper::logTrace)
                .thenApply(resultSet -> Tuple2.of(IntStream
                        .range(0, resultSet.getAvailableWithoutFetching())
                        .mapToObj(index -> resultSet.one().getString("[json]"))
                        .collect(Collectors.toList()), resultSet.getExecutionInfo()));
    }
1000721
public final <T3> Tuple3<T1, T2, T3> concat(T3 value) {
        return new Tuple3<>(v1, v2, value);
    }