public static TypeInfo convertStructType(RelDataType rType) {
    List<TypeInfo> fTypes = Lists.transform(rType.getFieldList(),
        new Function<RelDataTypeField, TypeInfo>() {
          @Override
          public TypeInfo apply(RelDataTypeField f) {
            return convert(f.getType());
          }
        });
    List<String> fNames = Lists.transform(rType.getFieldList(),
        new Function<RelDataTypeField, String>() {
          @Override
          public String apply(RelDataTypeField f) {
            return f.getName();
          }
        });
    boolean isUnionType = fNames.stream().allMatch(f -> f.startsWith(UNION_FIELD_PREFIX));
    if (isUnionType) {
      return TypeInfoFactory.getUnionTypeInfo(fTypes);
    } else {
      return TypeInfoFactory.getStructTypeInfo(fNames, fTypes);
    }
  }
******************** Convert Hive Types To Calcite Types **********************
ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/translator/TypeConverter.java