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

    https://github.com/apache/carbondata/pull/3059#discussion_r246286723
  
    --- Diff: 
processing/src/main/java/org/apache/carbondata/processing/util/CarbonLoaderUtil.java
 ---
    @@ -609,6 +597,10 @@ public static Dictionary 
getDictionary(AbsoluteTableIdentifier absoluteTableIden
               blockAssignmentStrategy = 
BlockAssignmentStrategy.BLOCK_SIZE_FIRST;
             } else {
               blockAssignmentStrategy = 
BlockAssignmentStrategy.BLOCK_NUM_FIRST;
    +          // fall back to BLOCK_NUM_FIRST strategy need to recalculate
    +          // the average expected size for each node
    +          sizePerNode = calcAvgLoadSizePerNode(blockInfos,uniqueBlocks,
    --- End diff --
    
    Avoid calculating times same values. Calculate once and reuse based on the 
strategy.


---

Reply via email to