private int getSize(int pos, TypeInfo typeInfo) {
    if (typeInfo instanceof PrimitiveTypeInfo) {
      return getSize(pos, ((PrimitiveTypeInfo) typeInfo).getPrimitiveCategory());
    }
    return javaSizeUnknownType;
  }
@param pos
         position of the key
@param typeInfo
         type of the input
@return the size of this datatype
ql/src/java/org/apache/hadoop/hive/ql/exec/GroupByOperator.java