You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2019/05/01 14:50:12 UTC

[GitHub] [incubator-hudi] vinothchandar commented on a change in pull request #657: [HUDI-57] support orc file

vinothchandar commented on a change in pull request #657: [HUDI-57] support orc file
URL: https://github.com/apache/incubator-hudi/pull/657#discussion_r280093377
 
 

 ##########
 File path: hoodie-client/src/main/java/com/uber/hoodie/io/HoodieCreateHandle.java
 ##########
 @@ -69,8 +70,16 @@ public HoodieCreateHandle(HoodieWriteConfig config, String commitTime, HoodieTab
       HoodiePartitionMetadata partitionMetadata = new HoodiePartitionMetadata(fs, commitTime,
           new Path(config.getBasePath()), FSUtils.getPartitionPath(config.getBasePath(), partitionPath));
       partitionMetadata.trySave(TaskContext.getPartitionId());
-      this.storageWriter = HoodieStorageWriterFactory
-          .getStorageWriter(commitTime, getStorageWriterPath(), hoodieTable, config, writerSchema);
+
+      String type = config.getFileType();
+      if (!type.equalsIgnoreCase("orc")) {
+        this.storageWriter = HoodieStorageWriterFactory
+            .getStorageWriter(commitTime, getStorageWriterPath(), hoodieTable, config, writerSchema);
+      } else {
+        TypeDescription orcSchema = TypeDescription.fromString(config.getOrcStringSchema());
+        this.storageWriter = HoodieStorageWriterFactory
 
 Review comment:
   since the config already contains the OrcStringSchema, can we handle this difference internally within `HoodieStorageWriterFactory.getStorageWriter()`.. Ideally, the handle classes should just call `getStorageWriter` not a orc specific method like `getOrcStorageWriter`

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services