hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "payal (JIRA)" <j...@apache.org>
Subject [jira] [Created] (HIVE-9311) I tryed to run max query using jdbc it didint work
Date Thu, 08 Jan 2015 11:12:34 GMT
payal created HIVE-9311:
---------------------------

             Summary: I tryed to run max query using jdbc it didint work
                 Key: HIVE-9311
                 URL: https://issues.apache.org/jira/browse/HIVE-9311
             Project: Hive
          Issue Type: Bug
          Components: Configuration
    Affects Versions: 0.12.0
            Reporter: payal


I tryed to run max query using jdbc it didint work please look at it

Class.forName("org.apache.hive.jdbc.HiveDriver");

        try {
            con1 =3D DriverManager.getConnection(
                    "jdbc:hive2://dkhc3012:10000/default", "hive", "");
        } catch (SQLException sqle) {
            System.out.println("SQL Exception thrown: " + sqle);
        }

        System.out.println("Connected");
        System.out.println(columns + tables);
        Statement stmt =3D con1.createStatement();
        result =3D stmt.executeQuery("SELECT max(date_id) FROM date_dim");
        while (result.next()) {
            System.out.println("In while");
             val =3D result.getInt(1);
            System.out.println(val);
            System.out.println(result.getString(1));
        }
        System.out.println("JDBC Done");




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message