public static RelDataType convert(TypeInfo type, boolean nullable, RelDataTypeFactory dtFactory) {
    RelDataType convertedType = null;

    switch (type.getCategory()) {
    case PRIMITIVE:
      convertedType = convert((PrimitiveTypeInfo) type, nullable, dtFactory);
      break;
    case LIST:
      convertedType = convert((ListTypeInfo) type, dtFactory);
      break;
    case MAP:
      convertedType = convert((MapTypeInfo) type, dtFactory);
      break;
    case STRUCT:
      convertedType = convert((StructTypeInfo) type, dtFactory);
      break;
    case UNION:
      convertedType = convert((UnionTypeInfo) type, dtFactory);
      break;
    }
    // hive does not have concept of not nullable types
    return dtFactory.createTypeWithNullability(convertedType, nullable);
  }
******************** Convert Hive Types To Calcite Types **********************
ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/translator/TypeConverter.java