public static boolean[] identifyDimensionType(List<CarbonDimension> tableDimensionList){
  List<Boolean> isDictionaryDimensions=new ArrayList<Boolean>();
  Set<Integer> processedColumnGroup=new HashSet<Integer>();
  for (  CarbonDimension carbonDimension : tableDimensionList) {
    List<CarbonDimension> childs=carbonDimension.getListOfChildDimensions();
    if (null != childs && childs.size() > 0) {
      break;
    }
    if (carbonDimension.isColumnar() && hasEncoding(carbonDimension.getEncoder(),Encoding.DICTIONARY)) {
      isDictionaryDimensions.add(true);
    }
 else     if (!carbonDimension.isColumnar()) {
      if (processedColumnGroup.add(carbonDimension.columnGroupId())) {
        isDictionaryDimensions.add(true);
      }
    }
 else {
      isDictionaryDimensions.add(false);
    }
  }
  boolean[] primitive=ArrayUtils.toPrimitive(isDictionaryDimensions.toArray(new Boolean[isDictionaryDimensions.size()]));
  return primitive;
}

public static boolean [ ] identifyDimensionType ( List < CarbonDimension > tableDimensionList ) { List < Boolean > isDictionaryDimensions = new ArrayList < Boolean > ( ) ; Set < Integer > processedColumnGroup = new HashSet < Integer > ( ) ; for ( CarbonDimension carbonDimension : tableDimensionList ) { List < CarbonDimension > childs = carbonDimension . getListOfChildDimensions ( ) ; if ( null != childs && childs . size ( ) > 0 ) { break ; } if ( carbonDimension . isColumnar ( ) && hasEncoding ( carbonDimension . getEncoder ( ) , Encoding . DICTIONARY ) ) { isDictionaryDimensions . add ( true ) ; } else if ( ! carbonDimension . isColumnar ( ) ) { if ( processedColumnGroup . add ( carbonDimension . columnGroupId ( ) ) ) { isDictionaryDimensions . add ( true ) ; } } else { isDictionaryDimensions . add ( false ) ; } } boolean [ ] primitive = ArrayUtils . toPrimitive ( isDictionaryDimensions . toArray ( new Boolean [ isDictionaryDimensions . size ( ) ] ) ) ; return primitive ; }
below method will be used to get the dimension
