code: 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);
      }
docs: write tuple data to cassandra