@Override
  public void fetchStart(
      DBCSession session, final DBCResultSet resultSet, long offset, long maxRows)
      throws DBCException {
    this.rows.clear();
    this.offset = offset;
    this.maxRows = maxRows;

    if (!nextSegmentRead) {
      // Get columns metadata
      DBCResultSetMetaData metaData = resultSet.getMeta();

      List<DBCAttributeMetaData> rsAttributes = metaData.getAttributes();
      columnsCount = rsAttributes.size();

      // Extract column info
      metaColumns = new DBDAttributeBindingMeta[columnsCount];
      for (int i = 0; i < columnsCount; i++) {
        metaColumns[i] = DBUtils.getAttributeBinding(session, rsAttributes.get(i));
      }

      resultSetViewer.setMetaData(metaColumns);
    }
  }
 private void runInUI(Runnable runnable) {
   Control control = resultSetViewer.getControl();
   if (!control.isDisposed()) {
     control.getDisplay().asyncExec(runnable);
   }
 }