You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@carbondata.apache.org by manishgupta88 <gi...@git.apache.org> on 2018/04/03 11:18:00 UTC

[GitHub] carbondata pull request #2109: [CARBONDATA-2294] Partition preaggregate supp...

Github user manishgupta88 commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/2109#discussion_r178719497
  
    --- Diff: hadoop/src/main/java/org/apache/carbondata/hadoop/api/CarbonOutputCommitter.java ---
    @@ -130,15 +130,20 @@ public CarbonOutputCommitter(Path outputPath, TaskAttemptContext context) throws
               loadModel.getTablePath());
           newMetaEntry.setSegmentFile(segmentFileName + CarbonTablePath.SEGMENT_EXT);
         }
    +    OperationContext operationContext = (OperationContext) getOperationContext();
    +    String uuid = "";
    +    if (loadModel.getCarbonDataLoadSchema().getCarbonTable().isChildDataMap() &&
    +        operationContext != null) {
    +      uuid = operationContext.getProperty("uuid").toString();
    +    }
         CarbonLoaderUtil
             .populateNewLoadMetaEntry(newMetaEntry, SegmentStatus.SUCCESS, loadModel.getFactTimeStamp(),
                 true);
         CarbonTable carbonTable = loadModel.getCarbonDataLoadSchema().getCarbonTable();
         long segmentSize = CarbonLoaderUtil
             .addDataIndexSizeIntoMetaEntry(newMetaEntry, loadModel.getSegmentId(), carbonTable);
         if (segmentSize > 0 || overwriteSet) {
    -      Object operationContext = getOperationContext();
    -      if (operationContext != null) {
    +      if (operationContext != null && carbonTable.hasAggregationDataMap()) {
             ((OperationContext) operationContext)
    --- End diff --
    
    Remove typecasting again


---