public static Type defineType(int type) {
    if (type == java.sql.Types.CHAR || type == java.sql.Types.VARCHAR) {
      return Type.STRING;
    }
    else if (type == java.sql.Types.INTEGER || type == java.sql.Types.BIGINT) {
      return Type.BIGINT;
    }
    return Type.NULL;
  }
Define the data type from JDBC type code
hplsql/src/main/java/org/apache/hive/hplsql/Var.java