code: private List<String[]> buildRows(List<ColumnTypeDataPair> columns) throws BindException
    {
      List<String[]> rows = new ArrayList<>();
  
      int numColumns = columns.size();
      // columns should have binds
      if (columns.get(0).data.isEmpty())
      {
        throw new BindException("No binds found in first column", BindException.Type.SERIALIZATION);
      }
  
      int numRows = columns.get(0).data.size();
      // every column should have the same number of binds
      for (int i = 0; i < numColumns; i++)
      {
        int iNumRows = columns.get(i).data.size();
        if (columns.get(i).data.size() != numRows)
        {
          throw new BindException(
              String.format("Column %d has a different number of binds (%d) than column 1 (%d)", i, iNumRows, numRows), BindException.Type.SERIALIZATION);
        }
      }
  
      for (int rowIdx = 0; rowIdx < numRows; rowIdx++)
      {
        String[] row = new String[numColumns];
        for (int colIdx = 0; colIdx < numColumns; colIdx++)
        {
          row[colIdx] = columns.get(colIdx).data.get(rowIdx);
        }
        rows.add(row);
      }
  
      return rows;
    }
docs: Transpose a list of columns and their values to a list of rows
  
  @param columns the list of columns to transpose
  @return list of rows
  @throws BindException if columns improperly formed