[
https://issues.apache.org/jira/browse/DRILL-8022?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17436567#comment-17436567
]
ASF GitHub Bot commented on DRILL-8022:
---------------------------------------
cgivre commented on a change in pull request #2354:
URL: https://github.com/apache/drill/pull/2354#discussion_r739887830
##########
File path:
contrib/format-excel/src/main/java/org/apache/drill/exec/store/excel/ExcelBatchReader.java
##########
@@ -710,6 +785,40 @@ public void load(Cell cell) {
}
}
+
+ public static class IntStringWriter extends ExcelBatchReader.CellWriter {
+ IntStringWriter(ScalarWriter columnWriter) {
+ super(columnWriter);
+ }
+
+ @Override
+ public void load(Cell cell) {
+ if (cell == null) {
+ columnWriter.setNull();
+ } else {
+ String fieldValue = String.valueOf(cell.getNumericCellValue());
+ columnWriter.setString(fieldValue);
+ }
+ }
+ }
+
+ public static class IntCellWriter extends ExcelBatchReader.CellWriter {
+ IntCellWriter(ScalarWriter columnWriter) {
+ super(columnWriter);
+ }
+
+ @Override
+ public void load(Cell cell) {
+ if (cell == null) {
+ columnWriter.setNull();
+ } else {
+ int fieldNumValue = (int)cell.getNumericCellValue();
Review comment:
Fixed
--
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]
> Add Provided Schema Support for Excel Reader
> --------------------------------------------
>
> Key: DRILL-8022
> URL: https://issues.apache.org/jira/browse/DRILL-8022
> Project: Apache Drill
> Issue Type: Improvement
> Components: Storage - Text & CSV
> Affects Versions: 1.19.0
> Reporter: Charles Givre
> Assignee: Charles Givre
> Priority: Major
> Fix For: 1.20.0
>
>
> Add support for provided schema for Excel files.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)