arjansh commented on a change in pull request #230: dev/add datatypes to excel columns URL: https://github.com/apache/metamodel/pull/230#discussion_r328526951
########## File path: excel/src/main/java/org/apache/metamodel/excel/DefaultSpreadsheetReaderDelegate.java ########## @@ -128,6 +126,12 @@ private MutableTable createTable(final Workbook wb, final Sheet sheet) { row = rowIterator.next(); } + // Get first 1000 rows for the eager-read + final Iterator<Row> data = ExcelUtils.getRowIterator(sheet, _configuration, false); + int rowLength = row.getLastCellNum(); + ColumnType[] columnTypes = new ColumnType[rowLength]; + + setColumnType(data, rowLength, columnTypes); Review comment: I would remove lines 129 through 131 from this method and also this line (134) and internalize these into a `getColumnTypes` method, so you get something like this here: ``` final ColumnType[] columnTypes = getColumnTypes(sheet, row); ``` ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services