@Override
  public ColumnInfo getColumnInfo(org.apache.hadoop.hive.ql.metadata.Table hmsTable, String colName)
      throws SemanticException {
    Table icebergTbl = IcebergTableUtil.getTable(conf, hmsTable.getTTable());
    Deserializer deserializer = hmsTable.getDeserializer();
    Types.NestedField field = icebergTbl.schema().findField(colName);
    if (field != null) {
      try {
        ObjectInspector fieldObjInspector = null;
        StructObjectInspector structObjectInspector = (StructObjectInspector) deserializer.getObjectInspector();
        for (StructField structField : structObjectInspector.getAllStructFieldRefs()) {
          if (field.name().equalsIgnoreCase(structField.getFieldName())) {
            fieldObjInspector = structField.getFieldObjectInspector();
            break;
          }
        }
        if (fieldObjInspector != null) {
          return new ColumnInfo(field.name(), fieldObjInspector, hmsTable.getTableName(), false);
        } else {
          throw new SemanticException(String.format("Unable to fetch column type of column %s " +
              "since we are not able to infer its object inspector.", colName));
        }
      } catch (SerDeException e) {
        throw new SemanticException(String.format("Unable to fetch column type of column %s due to: %s", colName, e));
      }
    } else {
      throw new SemanticException(String.format("Unable to find a column with the name: %s", colName));
    }
  }
A function to fetch the column information of the underlying column defined by the table format.
@param hmsTable A Hive table instance
@param colName Column name
@return An instance of ColumnInfo.
@throws SemanticException An exception is thrown when the column is not present, or if we unable to fetch
column type due to SerDeException, or if the associated field object inspector is not present.
iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/HiveIcebergStorageHandler.java