[ 
https://issues.apache.org/jira/browse/DRILL-8106?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17475629#comment-17475629
 ] 

ASF GitHub Bot commented on DRILL-8106:
---------------------------------------

cgivre commented on a change in pull request #2426:
URL: https://github.com/apache/drill/pull/2426#discussion_r784235563



##########
File path: 
contrib/format-excel/src/main/java/org/apache/drill/exec/store/excel/ExcelBatchReader.java
##########
@@ -312,41 +311,31 @@ private void getColumnHeaders(SchemaBuilder builder) {
     //If there are no headers, create columns names of field_n
     if (readerConfig.headerRow == -1) {
       String missingFieldName;
-      int i = 0;
 
-      for (Cell c : currentRow) {
-        missingFieldName = MISSING_FIELD_NAME_HEADER + (i + 1);
+      for (short colNum = 0; colNum < currentRow.getLastCellNum(); colNum++) {

Review comment:
       Gotcha.  




-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


> format-excel does not handle missing cells properly
> ---------------------------------------------------
>
>                 Key: DRILL-8106
>                 URL: https://issues.apache.org/jira/browse/DRILL-8106
>             Project: Apache Drill
>          Issue Type: Improvement
>          Components: Execution - Data Types
>            Reporter: PJ Fanning
>            Priority: Major
>
> ExcelBatchReader uses cellIterator assuming that this will return cells for 
> all columns - but this is not how that code works - the iterator only returns 
> non-empty cells.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to