This is an automated email from the ASF dual-hosted git repository.
dzamo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/drill.git
The following commit(s) were added to refs/heads/master by this push:
new 68bf3a9 DRILL-8112: Excel Reader Ignores HeaderRow Config Param
68bf3a9 is described below
commit 68bf3a93058c5d80011a1b9845403622f33fce4e
Author: Charles S. Givre <[email protected]>
AuthorDate: Wed Jan 26 02:22:47 2022 -0500
DRILL-8112: Excel Reader Ignores HeaderRow Config Param
---
.../java/org/apache/drill/exec/store/excel/ExcelBatchReader.java | 6 ++++++
1 file changed, 6 insertions(+)
diff --git
a/contrib/format-excel/src/main/java/org/apache/drill/exec/store/excel/ExcelBatchReader.java
b/contrib/format-excel/src/main/java/org/apache/drill/exec/store/excel/ExcelBatchReader.java
index cecec9a..9116f3d 100644
---
a/contrib/format-excel/src/main/java/org/apache/drill/exec/store/excel/ExcelBatchReader.java
+++
b/contrib/format-excel/src/main/java/org/apache/drill/exec/store/excel/ExcelBatchReader.java
@@ -325,6 +325,12 @@ public class ExcelBatchReader implements
ManagedReader<FileSchemaNegotiator> {
}
builder.buildSchema();
} else if (rowIterator.hasNext()) {
+
+ // Advance first row to header row, if defined.
+ if (readerConfig.headerRow > 0) {
+ skipToRow(readerConfig.headerRow);
+ }
+
//Get the header row and column count
totalColumnCount = currentRow.getLastCellNum();