You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by GitBox <gi...@apache.org> on 2021/10/31 22:53:00 UTC

[GitHub] [drill] cgivre commented on a change in pull request #2354: DRILL-8022: Add Provided Schema Support for Excel Reader

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: dev-unsubscribe@drill.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org