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

    https://github.com/apache/carbondata/pull/2414#discussion_r198162947
  
    --- Diff: 
processing/src/main/java/org/apache/carbondata/processing/loading/sort/unsafe/merger/UnsafeIntermediateMerger.java
 ---
    @@ -88,13 +88,25 @@ public UnsafeIntermediateMerger(SortParameters 
parameters) {
               
CarbonLoadOptionConstants.CARBON_LOAD_SORT_MEMORY_SPILL_PERCENTAGE,
               
CarbonLoadOptionConstants.CARBON_LOAD_SORT_MEMORY_SPILL_PERCENTAGE_DEFAULT);
           spillPercentage = Integer.valueOf(spillPercentageStr);
    +      if (spillPercentage > 100 || spillPercentage < 0) {
    --- End diff --
    
    One suggestion: add a function, called 'getSortMemorySpillPercentage', in 
'CarbonProperties' to get the value of 
'CARBON_LOAD_SORT_MEMORY_SPILL_PERCENTAGE', and validate the value in this 
function. We don't need to validate this value again if other place need to use 
this config, just need to call 'getSortMemorySpillPercentage'.


---

Reply via email to