protected void prepareImportTable() throws SQLException {
  ResultSet columnList=null;
  OneRowChange specOrc=new OneRowChange();
  columnDefinitions=new ArrayList<ColumnSpec>();
  try {
    columnList=metadata.getColumns(importTables.getString("TABLE_CAT"),importTables.getString("TABLE_SCHEM"),importTables.getString("TABLE_NAME"),null);
    while (columnList.next()) {
      ColumnSpec cSpec=specOrc.new ColumnSpec();
      cSpec.setName(columnList.getString("COLUMN_NAME"));
      cSpec.setType(extractColumnType(columnList));
      cSpec.setLength(columnList.getInt("COLUMN_SIZE"));
      columnDefinitions.add(cSpec);
      logger.debug("Import column " + columnList.getString("TABLE_SCHEM") + ":"+ columnList.getString("TABLE_NAME")+ ":"+ columnList.getString("COLUMN_NAME")+ ":"+ columnList.getString("DATA_TYPE")+ ":"+ columnList.getString("TYPE_NAME")+ ":"+ columnList.getInt("COLUMN_SIZE"));
    }
  }
  finally {
    if (columnList != null) {
      columnList.close();
    }
  }
}

protected void prepareImportTable ( ) throws SQLException { ResultSet columnList = null ; OneRowChange specOrc = new OneRowChange ( ) ; columnDefinitions = new ArrayList < ColumnSpec > ( ) ; try { columnList = metadata . getColumns ( importTables . getString ( "TABLE_CAT" ) , importTables . getString ( "TABLE_SCHEM" ) , importTables . getString ( "TABLE_NAME" ) , null ) ; while ( columnList . next ( ) ) { ColumnSpec cSpec = specOrc . new ColumnSpec ( ) ; cSpec . setName ( columnList . getString ( "COLUMN_NAME" ) ) ; cSpec . setType ( extractColumnType ( columnList ) ) ; cSpec . setLength ( columnList . getInt ( "COLUMN_SIZE" ) ) ; columnDefinitions . add ( cSpec ) ; logger . debug ( "Import column " + columnList . getString ( "TABLE_SCHEM" ) + ":" + columnList . getString ( "TABLE_NAME" ) + ":" + columnList . getString ( "COLUMN_NAME" ) + ":" + columnList . getString ( "DATA_TYPE" ) + ":" + columnList . getString ( "TYPE_NAME" ) + ":" + columnList . getInt ( "COLUMN_SIZE" ) ) ; } } finally { if ( columnList != null ) { columnList . close ( ) ; } } }
parse column definitions for the current table
