[GitHub] [carbondata] xubo245 commented on a change in pull request #3173: [CARBONDATA-3351] Support Binary Data Type

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[GitHub] [carbondata] xubo245 commented on a change in pull request #3173: [CARBONDATA-3351] Support Binary Data Type

GitBox
xubo245 commented on a change in pull request #3173: [CARBONDATA-3351] Support Binary Data Type
URL: https://github.com/apache/carbondata/pull/3173#discussion_r275750897
 
 

 ##########
 File path: store/sdk/src/main/java/org/apache/carbondata/sdk/file/CSVCarbonWriter.java
 ##########
 @@ -65,7 +65,7 @@
   @Override
   public void write(Object object) throws IOException {
     try {
-      writable.set((String[]) object);
+      writable.set((Object[]) object);
 
 Review comment:
   It can support write with real data type.
   
   `
             String labelFileName = ((String) files[i]).split(sufImage)[0] + sufAnnotation;
             BufferedInputStream txtBis = new BufferedInputStream(new FileInputStream(labelFileName));
             String labelValue = null;
             byte[] labelBinary = null;
             labelBinary = new byte[txtBis.available()];
             while ((txtBis.read(labelBinary)) != -1) {
               labelValue = new String(labelBinary, "UTF-8");
             }
             // write data
             writer.write(new Object[]{i, (String) files[i], originBinary,
                 labelFileName, labelValue});`

----------------------------------------------------------------
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:
[hidden email]


With regards,
Apache Git Services