Index: jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveCallableStatement.java =================================================================== --- jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveCallableStatement.java (revision 901519) +++ jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveCallableStatement.java (working copy) @@ -50,7 +50,9 @@ // TODO Auto-generated constructor stub } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.CallableStatement#getArray(int) */ @@ -59,7 +61,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.CallableStatement#getArray(java.lang.String) */ @@ -68,7 +72,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.CallableStatement#getBigDecimal(int) */ @@ -77,7 +83,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.CallableStatement#getBigDecimal(java.lang.String) */ @@ -86,7 +94,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.CallableStatement#getBigDecimal(int, int) */ @@ -96,7 +106,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.CallableStatement#getBlob(int) */ @@ -105,7 +117,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.CallableStatement#getBlob(java.lang.String) */ @@ -114,7 +128,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.CallableStatement#getBoolean(int) */ @@ -123,7 +139,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.CallableStatement#getBoolean(java.lang.String) */ @@ -132,7 +150,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.CallableStatement#getByte(int) */ @@ -141,7 +161,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.CallableStatement#getByte(java.lang.String) */ @@ -150,7 +172,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.CallableStatement#getBytes(int) */ @@ -159,7 +183,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.CallableStatement#getBytes(java.lang.String) */ @@ -168,7 +194,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.CallableStatement#getCharacterStream(int) */ @@ -177,7 +205,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.CallableStatement#getCharacterStream(java.lang.String) */ @@ -186,7 +216,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.CallableStatement#getClob(int) */ @@ -195,7 +227,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.CallableStatement#getClob(java.lang.String) */ @@ -204,7 +238,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.CallableStatement#getDate(int) */ @@ -213,7 +249,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.CallableStatement#getDate(java.lang.String) */ @@ -222,7 +260,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.CallableStatement#getDate(int, java.util.Calendar) */ @@ -231,8 +271,11 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) - * @see java.sql.CallableStatement#getDate(java.lang.String, java.util.Calendar) + /* + * (non-Javadoc) + * + * @see java.sql.CallableStatement#getDate(java.lang.String, + * java.util.Calendar) */ public Date getDate(String parameterName, Calendar cal) throws SQLException { @@ -240,7 +283,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.CallableStatement#getDouble(int) */ @@ -249,7 +294,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.CallableStatement#getDouble(java.lang.String) */ @@ -258,7 +305,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.CallableStatement#getFloat(int) */ @@ -267,7 +316,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.CallableStatement#getFloat(java.lang.String) */ @@ -276,7 +327,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.CallableStatement#getInt(int) */ @@ -285,7 +338,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.CallableStatement#getInt(java.lang.String) */ @@ -294,7 +349,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.CallableStatement#getLong(int) */ @@ -303,7 +360,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.CallableStatement#getLong(java.lang.String) */ @@ -312,7 +371,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.CallableStatement#getNCharacterStream(int) */ @@ -321,7 +382,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.CallableStatement#getNCharacterStream(java.lang.String) */ @@ -330,7 +393,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.CallableStatement#getNClob(int) */ @@ -339,7 +404,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.CallableStatement#getNClob(java.lang.String) */ @@ -348,7 +415,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.CallableStatement#getNString(int) */ @@ -357,7 +426,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.CallableStatement#getNString(java.lang.String) */ @@ -366,7 +437,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.CallableStatement#getObject(int) */ @@ -375,7 +448,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.CallableStatement#getObject(java.lang.String) */ @@ -384,17 +459,20 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.CallableStatement#getObject(int, java.util.Map) */ - public Object getObject(int i, Map> map) - throws SQLException { + public Object getObject(int i, Map> map) throws SQLException { // TODO Auto-generated method stub throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.CallableStatement#getObject(java.lang.String, java.util.Map) */ @@ -404,7 +482,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.CallableStatement#getRef(int) */ @@ -413,7 +493,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.CallableStatement#getRef(java.lang.String) */ @@ -422,7 +504,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.CallableStatement#getRowId(int) */ @@ -431,7 +515,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.CallableStatement#getRowId(java.lang.String) */ @@ -440,7 +526,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.CallableStatement#getSQLXML(int) */ @@ -449,7 +537,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.CallableStatement#getSQLXML(java.lang.String) */ @@ -458,7 +548,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.CallableStatement#getShort(int) */ @@ -467,7 +559,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.CallableStatement#getShort(java.lang.String) */ @@ -476,7 +570,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.CallableStatement#getString(int) */ @@ -485,7 +581,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.CallableStatement#getString(java.lang.String) */ @@ -494,7 +592,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.CallableStatement#getTime(int) */ @@ -503,7 +603,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.CallableStatement#getTime(java.lang.String) */ @@ -512,7 +614,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.CallableStatement#getTime(int, java.util.Calendar) */ @@ -521,8 +625,11 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) - * @see java.sql.CallableStatement#getTime(java.lang.String, java.util.Calendar) + /* + * (non-Javadoc) + * + * @see java.sql.CallableStatement#getTime(java.lang.String, + * java.util.Calendar) */ public Time getTime(String parameterName, Calendar cal) throws SQLException { @@ -530,7 +637,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.CallableStatement#getTimestamp(int) */ @@ -539,7 +648,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.CallableStatement#getTimestamp(java.lang.String) */ @@ -548,7 +659,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.CallableStatement#getTimestamp(int, java.util.Calendar) */ @@ -558,8 +671,11 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) - * @see java.sql.CallableStatement#getTimestamp(java.lang.String, java.util.Calendar) + /* + * (non-Javadoc) + * + * @see java.sql.CallableStatement#getTimestamp(java.lang.String, + * java.util.Calendar) */ public Timestamp getTimestamp(String parameterName, Calendar cal) @@ -568,7 +684,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.CallableStatement#getURL(int) */ @@ -577,7 +695,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.CallableStatement#getURL(java.lang.String) */ @@ -586,7 +706,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.CallableStatement#registerOutParameter(int, int) */ @@ -596,7 +718,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.CallableStatement#registerOutParameter(java.lang.String, int) */ @@ -606,7 +730,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.CallableStatement#registerOutParameter(int, int, int) */ @@ -616,28 +742,37 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) - * @see java.sql.CallableStatement#registerOutParameter(int, int, java.lang.String) + /* + * (non-Javadoc) + * + * @see java.sql.CallableStatement#registerOutParameter(int, int, + * java.lang.String) */ - public void registerOutParameter(int paramIndex, int sqlType, - String typeName) throws SQLException { + public void registerOutParameter(int paramIndex, int sqlType, String typeName) + throws SQLException { // TODO Auto-generated method stub throw new SQLException("Method not supported"); } - /* (non-Javadoc) - * @see java.sql.CallableStatement#registerOutParameter(java.lang.String, int, int) + /* + * (non-Javadoc) + * + * @see java.sql.CallableStatement#registerOutParameter(java.lang.String, int, + * int) */ - public void registerOutParameter(String parameterName, int sqlType, - int scale) throws SQLException { + public void registerOutParameter(String parameterName, int sqlType, int scale) + throws SQLException { // TODO Auto-generated method stub throw new SQLException("Method not supported"); } - /* (non-Javadoc) - * @see java.sql.CallableStatement#registerOutParameter(java.lang.String, int, java.lang.String) + /* + * (non-Javadoc) + * + * @see java.sql.CallableStatement#registerOutParameter(java.lang.String, int, + * java.lang.String) */ public void registerOutParameter(String parameterName, int sqlType, @@ -646,8 +781,11 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) - * @see java.sql.CallableStatement#setAsciiStream(java.lang.String, java.io.InputStream) + /* + * (non-Javadoc) + * + * @see java.sql.CallableStatement#setAsciiStream(java.lang.String, + * java.io.InputStream) */ public void setAsciiStream(String parameterName, InputStream x) @@ -656,8 +794,11 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) - * @see java.sql.CallableStatement#setAsciiStream(java.lang.String, java.io.InputStream, int) + /* + * (non-Javadoc) + * + * @see java.sql.CallableStatement#setAsciiStream(java.lang.String, + * java.io.InputStream, int) */ public void setAsciiStream(String parameterName, InputStream x, int length) @@ -666,8 +807,11 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) - * @see java.sql.CallableStatement#setAsciiStream(java.lang.String, java.io.InputStream, long) + /* + * (non-Javadoc) + * + * @see java.sql.CallableStatement#setAsciiStream(java.lang.String, + * java.io.InputStream, long) */ public void setAsciiStream(String parameterName, InputStream x, long length) @@ -676,8 +820,11 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) - * @see java.sql.CallableStatement#setBigDecimal(java.lang.String, java.math.BigDecimal) + /* + * (non-Javadoc) + * + * @see java.sql.CallableStatement#setBigDecimal(java.lang.String, + * java.math.BigDecimal) */ public void setBigDecimal(String parameterName, BigDecimal x) @@ -686,8 +833,11 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) - * @see java.sql.CallableStatement#setBinaryStream(java.lang.String, java.io.InputStream) + /* + * (non-Javadoc) + * + * @see java.sql.CallableStatement#setBinaryStream(java.lang.String, + * java.io.InputStream) */ public void setBinaryStream(String parameterName, InputStream x) @@ -696,8 +846,11 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) - * @see java.sql.CallableStatement#setBinaryStream(java.lang.String, java.io.InputStream, int) + /* + * (non-Javadoc) + * + * @see java.sql.CallableStatement#setBinaryStream(java.lang.String, + * java.io.InputStream, int) */ public void setBinaryStream(String parameterName, InputStream x, int length) @@ -706,8 +859,11 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) - * @see java.sql.CallableStatement#setBinaryStream(java.lang.String, java.io.InputStream, long) + /* + * (non-Javadoc) + * + * @see java.sql.CallableStatement#setBinaryStream(java.lang.String, + * java.io.InputStream, long) */ public void setBinaryStream(String parameterName, InputStream x, long length) @@ -716,7 +872,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.CallableStatement#setBlob(java.lang.String, java.sql.Blob) */ @@ -725,8 +883,11 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) - * @see java.sql.CallableStatement#setBlob(java.lang.String, java.io.InputStream) + /* + * (non-Javadoc) + * + * @see java.sql.CallableStatement#setBlob(java.lang.String, + * java.io.InputStream) */ public void setBlob(String parameterName, InputStream inputStream) @@ -735,17 +896,22 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) - * @see java.sql.CallableStatement#setBlob(java.lang.String, java.io.InputStream, long) + /* + * (non-Javadoc) + * + * @see java.sql.CallableStatement#setBlob(java.lang.String, + * java.io.InputStream, long) */ - public void setBlob(String parameterName, InputStream inputStream, - long length) throws SQLException { + public void setBlob(String parameterName, InputStream inputStream, long length) + throws SQLException { // TODO Auto-generated method stub throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.CallableStatement#setBoolean(java.lang.String, boolean) */ @@ -754,7 +920,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.CallableStatement#setByte(java.lang.String, byte) */ @@ -763,7 +931,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.CallableStatement#setBytes(java.lang.String, byte[]) */ @@ -772,8 +942,11 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) - * @see java.sql.CallableStatement#setCharacterStream(java.lang.String, java.io.Reader) + /* + * (non-Javadoc) + * + * @see java.sql.CallableStatement#setCharacterStream(java.lang.String, + * java.io.Reader) */ public void setCharacterStream(String parameterName, Reader reader) @@ -782,18 +955,24 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) - * @see java.sql.CallableStatement#setCharacterStream(java.lang.String, java.io.Reader, int) + /* + * (non-Javadoc) + * + * @see java.sql.CallableStatement#setCharacterStream(java.lang.String, + * java.io.Reader, int) */ - public void setCharacterStream(String parameterName, Reader reader, - int length) throws SQLException { + public void setCharacterStream(String parameterName, Reader reader, int length) + throws SQLException { // TODO Auto-generated method stub throw new SQLException("Method not supported"); } - /* (non-Javadoc) - * @see java.sql.CallableStatement#setCharacterStream(java.lang.String, java.io.Reader, long) + /* + * (non-Javadoc) + * + * @see java.sql.CallableStatement#setCharacterStream(java.lang.String, + * java.io.Reader, long) */ public void setCharacterStream(String parameterName, Reader reader, @@ -802,7 +981,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.CallableStatement#setClob(java.lang.String, java.sql.Clob) */ @@ -811,18 +992,22 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.CallableStatement#setClob(java.lang.String, java.io.Reader) */ - public void setClob(String parameterName, Reader reader) - throws SQLException { + public void setClob(String parameterName, Reader reader) throws SQLException { // TODO Auto-generated method stub throw new SQLException("Method not supported"); } - /* (non-Javadoc) - * @see java.sql.CallableStatement#setClob(java.lang.String, java.io.Reader, long) + /* + * (non-Javadoc) + * + * @see java.sql.CallableStatement#setClob(java.lang.String, java.io.Reader, + * long) */ public void setClob(String parameterName, Reader reader, long length) @@ -831,7 +1016,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.CallableStatement#setDate(java.lang.String, java.sql.Date) */ @@ -840,8 +1027,11 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) - * @see java.sql.CallableStatement#setDate(java.lang.String, java.sql.Date, java.util.Calendar) + /* + * (non-Javadoc) + * + * @see java.sql.CallableStatement#setDate(java.lang.String, java.sql.Date, + * java.util.Calendar) */ public void setDate(String parameterName, Date x, Calendar cal) @@ -850,7 +1040,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.CallableStatement#setDouble(java.lang.String, double) */ @@ -859,7 +1051,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.CallableStatement#setFloat(java.lang.String, float) */ @@ -868,7 +1062,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.CallableStatement#setInt(java.lang.String, int) */ @@ -877,7 +1073,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.CallableStatement#setLong(java.lang.String, long) */ @@ -886,8 +1084,11 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) - * @see java.sql.CallableStatement#setNCharacterStream(java.lang.String, java.io.Reader) + /* + * (non-Javadoc) + * + * @see java.sql.CallableStatement#setNCharacterStream(java.lang.String, + * java.io.Reader) */ public void setNCharacterStream(String parameterName, Reader value) @@ -896,8 +1097,11 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) - * @see java.sql.CallableStatement#setNCharacterStream(java.lang.String, java.io.Reader, long) + /* + * (non-Javadoc) + * + * @see java.sql.CallableStatement#setNCharacterStream(java.lang.String, + * java.io.Reader, long) */ public void setNCharacterStream(String parameterName, Reader value, @@ -906,7 +1110,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.CallableStatement#setNClob(java.lang.String, java.sql.NClob) */ @@ -915,18 +1121,22 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.CallableStatement#setNClob(java.lang.String, java.io.Reader) */ - public void setNClob(String parameterName, Reader reader) - throws SQLException { + public void setNClob(String parameterName, Reader reader) throws SQLException { // TODO Auto-generated method stub throw new SQLException("Method not supported"); } - /* (non-Javadoc) - * @see java.sql.CallableStatement#setNClob(java.lang.String, java.io.Reader, long) + /* + * (non-Javadoc) + * + * @see java.sql.CallableStatement#setNClob(java.lang.String, java.io.Reader, + * long) */ public void setNClob(String parameterName, Reader reader, long length) @@ -935,8 +1145,11 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) - * @see java.sql.CallableStatement#setNString(java.lang.String, java.lang.String) + /* + * (non-Javadoc) + * + * @see java.sql.CallableStatement#setNString(java.lang.String, + * java.lang.String) */ public void setNString(String parameterName, String value) @@ -945,7 +1158,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.CallableStatement#setNull(java.lang.String, int) */ @@ -954,8 +1169,11 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) - * @see java.sql.CallableStatement#setNull(java.lang.String, int, java.lang.String) + /* + * (non-Javadoc) + * + * @see java.sql.CallableStatement#setNull(java.lang.String, int, + * java.lang.String) */ public void setNull(String parameterName, int sqlType, String typeName) @@ -964,8 +1182,11 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) - * @see java.sql.CallableStatement#setObject(java.lang.String, java.lang.Object) + /* + * (non-Javadoc) + * + * @see java.sql.CallableStatement#setObject(java.lang.String, + * java.lang.Object) */ public void setObject(String parameterName, Object x) throws SQLException { @@ -973,8 +1194,11 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) - * @see java.sql.CallableStatement#setObject(java.lang.String, java.lang.Object, int) + /* + * (non-Javadoc) + * + * @see java.sql.CallableStatement#setObject(java.lang.String, + * java.lang.Object, int) */ public void setObject(String parameterName, Object x, int targetSqlType) @@ -983,8 +1207,11 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) - * @see java.sql.CallableStatement#setObject(java.lang.String, java.lang.Object, int, int) + /* + * (non-Javadoc) + * + * @see java.sql.CallableStatement#setObject(java.lang.String, + * java.lang.Object, int, int) */ public void setObject(String parameterName, Object x, int targetSqlType, @@ -993,7 +1220,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.CallableStatement#setRowId(java.lang.String, java.sql.RowId) */ @@ -1002,8 +1231,11 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) - * @see java.sql.CallableStatement#setSQLXML(java.lang.String, java.sql.SQLXML) + /* + * (non-Javadoc) + * + * @see java.sql.CallableStatement#setSQLXML(java.lang.String, + * java.sql.SQLXML) */ public void setSQLXML(String parameterName, SQLXML xmlObject) @@ -1012,7 +1244,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.CallableStatement#setShort(java.lang.String, short) */ @@ -1021,8 +1255,11 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) - * @see java.sql.CallableStatement#setString(java.lang.String, java.lang.String) + /* + * (non-Javadoc) + * + * @see java.sql.CallableStatement#setString(java.lang.String, + * java.lang.String) */ public void setString(String parameterName, String x) throws SQLException { @@ -1030,7 +1267,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.CallableStatement#setTime(java.lang.String, java.sql.Time) */ @@ -1039,8 +1278,11 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) - * @see java.sql.CallableStatement#setTime(java.lang.String, java.sql.Time, java.util.Calendar) + /* + * (non-Javadoc) + * + * @see java.sql.CallableStatement#setTime(java.lang.String, java.sql.Time, + * java.util.Calendar) */ public void setTime(String parameterName, Time x, Calendar cal) @@ -1049,8 +1291,11 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) - * @see java.sql.CallableStatement#setTimestamp(java.lang.String, java.sql.Timestamp) + /* + * (non-Javadoc) + * + * @see java.sql.CallableStatement#setTimestamp(java.lang.String, + * java.sql.Timestamp) */ public void setTimestamp(String parameterName, Timestamp x) @@ -1059,8 +1304,11 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) - * @see java.sql.CallableStatement#setTimestamp(java.lang.String, java.sql.Timestamp, java.util.Calendar) + /* + * (non-Javadoc) + * + * @see java.sql.CallableStatement#setTimestamp(java.lang.String, + * java.sql.Timestamp, java.util.Calendar) */ public void setTimestamp(String parameterName, Timestamp x, Calendar cal) @@ -1069,7 +1317,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.CallableStatement#setURL(java.lang.String, java.net.URL) */ @@ -1078,7 +1328,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.CallableStatement#wasNull() */ @@ -1087,7 +1339,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.PreparedStatement#addBatch() */ @@ -1096,7 +1350,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.PreparedStatement#clearParameters() */ @@ -1105,7 +1361,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.PreparedStatement#execute() */ @@ -1114,7 +1372,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.PreparedStatement#executeQuery() */ @@ -1123,7 +1383,9 @@ return new HiveResultSet(null); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.PreparedStatement#executeUpdate() */ @@ -1132,7 +1394,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.PreparedStatement#getMetaData() */ @@ -1141,7 +1405,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.PreparedStatement#getParameterMetaData() */ @@ -1150,7 +1416,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.PreparedStatement#setArray(int, java.sql.Array) */ @@ -1159,7 +1427,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.PreparedStatement#setAsciiStream(int, java.io.InputStream) */ @@ -1168,8 +1438,11 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) - * @see java.sql.PreparedStatement#setAsciiStream(int, java.io.InputStream, int) + /* + * (non-Javadoc) + * + * @see java.sql.PreparedStatement#setAsciiStream(int, java.io.InputStream, + * int) */ public void setAsciiStream(int parameterIndex, InputStream x, int length) @@ -1178,8 +1451,11 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) - * @see java.sql.PreparedStatement#setAsciiStream(int, java.io.InputStream, long) + /* + * (non-Javadoc) + * + * @see java.sql.PreparedStatement#setAsciiStream(int, java.io.InputStream, + * long) */ public void setAsciiStream(int arg0, InputStream arg1, long arg2) @@ -1188,7 +1464,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.PreparedStatement#setBigDecimal(int, java.math.BigDecimal) */ @@ -1198,7 +1476,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.PreparedStatement#setBinaryStream(int, java.io.InputStream) */ @@ -1208,8 +1488,11 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) - * @see java.sql.PreparedStatement#setBinaryStream(int, java.io.InputStream, int) + /* + * (non-Javadoc) + * + * @see java.sql.PreparedStatement#setBinaryStream(int, java.io.InputStream, + * int) */ public void setBinaryStream(int parameterIndex, InputStream x, int length) @@ -1218,8 +1501,11 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) - * @see java.sql.PreparedStatement#setBinaryStream(int, java.io.InputStream, long) + /* + * (non-Javadoc) + * + * @see java.sql.PreparedStatement#setBinaryStream(int, java.io.InputStream, + * long) */ public void setBinaryStream(int parameterIndex, InputStream x, long length) @@ -1228,7 +1514,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.PreparedStatement#setBlob(int, java.sql.Blob) */ @@ -1237,7 +1525,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.PreparedStatement#setBlob(int, java.io.InputStream) */ @@ -1247,7 +1537,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.PreparedStatement#setBlob(int, java.io.InputStream, long) */ @@ -1257,7 +1549,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.PreparedStatement#setBoolean(int, boolean) */ @@ -1266,7 +1560,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.PreparedStatement#setByte(int, byte) */ @@ -1275,7 +1571,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.PreparedStatement#setBytes(int, byte[]) */ @@ -1284,7 +1582,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.PreparedStatement#setCharacterStream(int, java.io.Reader) */ @@ -1294,8 +1594,11 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) - * @see java.sql.PreparedStatement#setCharacterStream(int, java.io.Reader, int) + /* + * (non-Javadoc) + * + * @see java.sql.PreparedStatement#setCharacterStream(int, java.io.Reader, + * int) */ public void setCharacterStream(int parameterIndex, Reader reader, int length) @@ -1304,17 +1607,22 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) - * @see java.sql.PreparedStatement#setCharacterStream(int, java.io.Reader, long) + /* + * (non-Javadoc) + * + * @see java.sql.PreparedStatement#setCharacterStream(int, java.io.Reader, + * long) */ - public void setCharacterStream(int parameterIndex, Reader reader, - long length) throws SQLException { + public void setCharacterStream(int parameterIndex, Reader reader, long length) + throws SQLException { // TODO Auto-generated method stub throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.PreparedStatement#setClob(int, java.sql.Clob) */ @@ -1323,7 +1631,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.PreparedStatement#setClob(int, java.io.Reader) */ @@ -1332,7 +1642,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.PreparedStatement#setClob(int, java.io.Reader, long) */ @@ -1342,7 +1654,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.PreparedStatement#setDate(int, java.sql.Date) */ @@ -1351,8 +1665,11 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) - * @see java.sql.PreparedStatement#setDate(int, java.sql.Date, java.util.Calendar) + /* + * (non-Javadoc) + * + * @see java.sql.PreparedStatement#setDate(int, java.sql.Date, + * java.util.Calendar) */ public void setDate(int parameterIndex, Date x, Calendar cal) @@ -1361,7 +1678,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.PreparedStatement#setDouble(int, double) */ @@ -1370,7 +1689,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.PreparedStatement#setFloat(int, float) */ @@ -1379,7 +1700,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.PreparedStatement#setInt(int, int) */ @@ -1388,7 +1711,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.PreparedStatement#setLong(int, long) */ @@ -1397,7 +1722,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.PreparedStatement#setNCharacterStream(int, java.io.Reader) */ @@ -1407,17 +1734,22 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) - * @see java.sql.PreparedStatement#setNCharacterStream(int, java.io.Reader, long) + /* + * (non-Javadoc) + * + * @see java.sql.PreparedStatement#setNCharacterStream(int, java.io.Reader, + * long) */ - public void setNCharacterStream(int parameterIndex, Reader value, - long length) throws SQLException { + public void setNCharacterStream(int parameterIndex, Reader value, long length) + throws SQLException { // TODO Auto-generated method stub throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.PreparedStatement#setNClob(int, java.sql.NClob) */ @@ -1426,7 +1758,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.PreparedStatement#setNClob(int, java.io.Reader) */ @@ -1435,7 +1769,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.PreparedStatement#setNClob(int, java.io.Reader, long) */ @@ -1445,17 +1781,20 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.PreparedStatement#setNString(int, java.lang.String) */ - public void setNString(int parameterIndex, String value) - throws SQLException { + public void setNString(int parameterIndex, String value) throws SQLException { // TODO Auto-generated method stub throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.PreparedStatement#setNull(int, int) */ @@ -1464,7 +1803,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.PreparedStatement#setNull(int, int, java.lang.String) */ @@ -1474,7 +1815,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.PreparedStatement#setObject(int, java.lang.Object) */ @@ -1483,7 +1826,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.PreparedStatement#setObject(int, java.lang.Object, int) */ @@ -1493,7 +1838,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.PreparedStatement#setObject(int, java.lang.Object, int, int) */ @@ -1503,7 +1850,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.PreparedStatement#setRef(int, java.sql.Ref) */ @@ -1512,7 +1861,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.PreparedStatement#setRowId(int, java.sql.RowId) */ @@ -1521,7 +1872,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.PreparedStatement#setSQLXML(int, java.sql.SQLXML) */ @@ -1531,7 +1884,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.PreparedStatement#setShort(int, short) */ @@ -1540,7 +1895,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.PreparedStatement#setString(int, java.lang.String) */ @@ -1549,7 +1906,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.PreparedStatement#setTime(int, java.sql.Time) */ @@ -1558,8 +1917,11 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) - * @see java.sql.PreparedStatement#setTime(int, java.sql.Time, java.util.Calendar) + /* + * (non-Javadoc) + * + * @see java.sql.PreparedStatement#setTime(int, java.sql.Time, + * java.util.Calendar) */ public void setTime(int parameterIndex, Time x, Calendar cal) @@ -1568,18 +1930,22 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.PreparedStatement#setTimestamp(int, java.sql.Timestamp) */ - public void setTimestamp(int parameterIndex, Timestamp x) - throws SQLException { + public void setTimestamp(int parameterIndex, Timestamp x) throws SQLException { // TODO Auto-generated method stub throw new SQLException("Method not supported"); } - /* (non-Javadoc) - * @see java.sql.PreparedStatement#setTimestamp(int, java.sql.Timestamp, java.util.Calendar) + /* + * (non-Javadoc) + * + * @see java.sql.PreparedStatement#setTimestamp(int, java.sql.Timestamp, + * java.util.Calendar) */ public void setTimestamp(int parameterIndex, Timestamp x, Calendar cal) @@ -1588,7 +1954,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.PreparedStatement#setURL(int, java.net.URL) */ @@ -1597,8 +1965,11 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) - * @see java.sql.PreparedStatement#setUnicodeStream(int, java.io.InputStream, int) + /* + * (non-Javadoc) + * + * @see java.sql.PreparedStatement#setUnicodeStream(int, java.io.InputStream, + * int) */ public void setUnicodeStream(int parameterIndex, InputStream x, int length) @@ -1607,7 +1978,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#addBatch(java.lang.String) */ @@ -1616,7 +1989,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#cancel() */ @@ -1625,7 +2000,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#clearBatch() */ @@ -1634,7 +2011,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#clearWarnings() */ @@ -1643,7 +2022,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#close() */ @@ -1652,7 +2033,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#execute(java.lang.String) */ @@ -1661,17 +2044,20 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#execute(java.lang.String, int) */ - public boolean execute(String sql, int autoGeneratedKeys) - throws SQLException { + public boolean execute(String sql, int autoGeneratedKeys) throws SQLException { // TODO Auto-generated method stub throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#execute(java.lang.String, int[]) */ @@ -1680,17 +2066,20 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#execute(java.lang.String, java.lang.String[]) */ - public boolean execute(String sql, String[] columnNames) - throws SQLException { + public boolean execute(String sql, String[] columnNames) throws SQLException { // TODO Auto-generated method stub throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#executeBatch() */ @@ -1699,7 +2088,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#executeQuery(java.lang.String) */ @@ -1708,7 +2099,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#executeUpdate(java.lang.String) */ @@ -1717,7 +2110,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#executeUpdate(java.lang.String, int) */ @@ -1727,17 +2122,20 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#executeUpdate(java.lang.String, int[]) */ - public int executeUpdate(String sql, int[] columnIndexes) - throws SQLException { + public int executeUpdate(String sql, int[] columnIndexes) throws SQLException { // TODO Auto-generated method stub throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#executeUpdate(java.lang.String, java.lang.String[]) */ @@ -1747,7 +2145,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#getConnection() */ @@ -1756,7 +2156,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#getFetchDirection() */ @@ -1765,7 +2167,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#getFetchSize() */ @@ -1774,7 +2178,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#getGeneratedKeys() */ @@ -1783,7 +2189,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#getMaxFieldSize() */ @@ -1792,7 +2200,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#getMaxRows() */ @@ -1801,7 +2211,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#getMoreResults() */ @@ -1810,7 +2222,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#getMoreResults(int) */ @@ -1819,7 +2233,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#getQueryTimeout() */ @@ -1828,7 +2244,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#getResultSet() */ @@ -1837,7 +2255,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#getResultSetConcurrency() */ @@ -1846,7 +2266,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#getResultSetHoldability() */ @@ -1855,7 +2277,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#getResultSetType() */ @@ -1864,7 +2288,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#getUpdateCount() */ @@ -1873,7 +2299,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#getWarnings() */ @@ -1882,7 +2310,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#isClosed() */ @@ -1891,7 +2321,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#isPoolable() */ @@ -1900,7 +2332,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#setCursorName(java.lang.String) */ @@ -1909,7 +2343,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#setEscapeProcessing(boolean) */ @@ -1918,7 +2354,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#setFetchDirection(int) */ @@ -1927,7 +2365,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#setFetchSize(int) */ @@ -1936,7 +2376,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#setMaxFieldSize(int) */ @@ -1945,7 +2387,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#setMaxRows(int) */ @@ -1954,7 +2398,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#setPoolable(boolean) */ @@ -1963,7 +2409,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#setQueryTimeout(int) */ @@ -1972,7 +2420,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Wrapper#isWrapperFor(java.lang.Class) */ @@ -1981,7 +2431,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Wrapper#unwrap(java.lang.Class) */ Index: jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveStatement.java =================================================================== --- jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveStatement.java (revision 901519) +++ jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveStatement.java (working copy) @@ -22,7 +22,7 @@ import java.sql.ResultSet; import java.sql.SQLException; import java.sql.SQLWarning; -import java.util.Vector; + import org.apache.hadoop.hive.service.HiveInterface; import org.apache.hadoop.hive.service.HiveServerException; @@ -61,7 +61,9 @@ this.client = client; } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#addBatch(java.lang.String) */ @@ -70,7 +72,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#cancel() */ @@ -79,7 +83,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#clearBatch() */ @@ -88,48 +94,57 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#clearWarnings() */ public void clearWarnings() throws SQLException { - this.warningChain = null; + warningChain = null; } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#close() */ public void close() throws SQLException { - //TODO: how to properly shut down the client? + // TODO: how to properly shut down the client? client = null; resultSet = null; isClosed = true; } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#execute(java.lang.String) */ public boolean execute(String sql) throws SQLException { ResultSet rs = executeQuery(sql); - //TODO: this should really check if there are results, but there's no easy - //way to do that without calling rs.next(); + // TODO: this should really check if there are results, but there's no easy + // way to do that without calling rs.next(); return rs != null; } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#execute(java.lang.String, int) */ - public boolean execute(String sql, int autoGeneratedKeys) - throws SQLException { + public boolean execute(String sql, int autoGeneratedKeys) throws SQLException { // TODO Auto-generated method stub throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#execute(java.lang.String, int[]) */ @@ -138,17 +153,20 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#execute(java.lang.String, java.lang.String[]) */ - public boolean execute(String sql, String[] columnNames) - throws SQLException { + public boolean execute(String sql, String[] columnNames) throws SQLException { // TODO Auto-generated method stub throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#executeBatch() */ @@ -157,29 +175,32 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#executeQuery(java.lang.String) */ public ResultSet executeQuery(String sql) throws SQLException { - if (this.isClosed) + if (isClosed) { throw new SQLException("Can't execute after statement has been closed"); + } try { - this.resultSet = null; + resultSet = null; client.execute(sql); - } - catch (HiveServerException e) { + } catch (HiveServerException e) { throw new SQLException(e.getMessage(), e.getSQLState(), e.getErrorCode()); + } catch (Exception ex) { + throw new SQLException(ex.toString(), "08S01"); } - catch (Exception ex) { - throw new SQLException(ex.toString(), "08S01"); - } - this.resultSet = new HiveResultSet(client, maxRows); - return this.resultSet; + resultSet = new HiveResultSet(client, maxRows); + return resultSet; } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#executeUpdate(java.lang.String) */ @@ -192,7 +213,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#executeUpdate(java.lang.String, int) */ @@ -202,17 +225,20 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#executeUpdate(java.lang.String, int[]) */ - public int executeUpdate(String sql, int[] columnIndexes) - throws SQLException { + public int executeUpdate(String sql, int[] columnIndexes) throws SQLException { // TODO Auto-generated method stub throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#executeUpdate(java.lang.String, java.lang.String[]) */ @@ -222,7 +248,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#getConnection() */ @@ -231,7 +259,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#getFetchDirection() */ @@ -240,7 +270,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#getFetchSize() */ @@ -249,7 +281,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#getGeneratedKeys() */ @@ -258,7 +292,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#getMaxFieldSize() */ @@ -267,15 +303,19 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#getMaxRows() */ public int getMaxRows() throws SQLException { - return this.maxRows; + return maxRows; } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#getMoreResults() */ @@ -284,7 +324,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#getMoreResults(int) */ @@ -293,7 +335,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#getQueryTimeout() */ @@ -302,15 +346,19 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#getResultSet() */ public ResultSet getResultSet() throws SQLException { - return this.resultSet; + return resultSet; } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#getResultSetConcurrency() */ @@ -319,7 +367,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#getResultSetHoldability() */ @@ -328,7 +378,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#getResultSetType() */ @@ -337,7 +389,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#getUpdateCount() */ @@ -345,23 +399,29 @@ return 0; } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#getWarnings() */ public SQLWarning getWarnings() throws SQLException { - return this.warningChain; + return warningChain; } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#isClosed() */ public boolean isClosed() throws SQLException { - return this.isClosed; + return isClosed; } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#isPoolable() */ @@ -370,7 +430,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#setCursorName(java.lang.String) */ @@ -379,7 +441,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#setEscapeProcessing(boolean) */ @@ -388,7 +452,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#setFetchDirection(int) */ @@ -397,7 +463,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#setFetchSize(int) */ @@ -406,7 +474,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#setMaxFieldSize(int) */ @@ -415,16 +485,22 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#setMaxRows(int) */ public void setMaxRows(int max) throws SQLException { - if (max < 0) throw new SQLException("max must be >= 0"); - this.maxRows = max; + if (max < 0) { + throw new SQLException("max must be >= 0"); + } + maxRows = max; } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#setPoolable(boolean) */ @@ -433,7 +509,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#setQueryTimeout(int) */ @@ -442,7 +520,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Wrapper#isWrapperFor(java.lang.Class) */ @@ -451,7 +531,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Wrapper#unwrap(java.lang.Class) */ Index: jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveDatabaseMetaData.java =================================================================== --- jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveDatabaseMetaData.java (revision 901519) +++ jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveDatabaseMetaData.java (working copy) @@ -18,15 +18,15 @@ package org.apache.hadoop.hive.jdbc; +import java.io.IOException; +import java.net.URL; import java.sql.Connection; +import java.sql.DatabaseMetaData; import java.sql.ResultSet; import java.sql.RowIdLifetime; import java.sql.SQLException; -import java.sql.DatabaseMetaData; -import java.net.URL; +import java.util.jar.Attributes; import java.util.jar.Manifest; -import java.util.jar.Attributes; -import java.io.IOException; public class HiveDatabaseMetaData implements java.sql.DatabaseMetaData { @@ -37,7 +37,9 @@ // TODO Auto-generated constructor stub } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#allProceduresAreCallable() */ @@ -46,7 +48,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#allTablesAreSelectable() */ @@ -55,7 +59,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#autoCommitFailureClosesAllResultSets() */ @@ -64,7 +70,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#dataDefinitionCausesTransactionCommit() */ @@ -73,7 +81,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#dataDefinitionIgnoredInTransactions() */ @@ -82,7 +92,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#deletesAreDetected(int) */ @@ -91,7 +103,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#doesMaxRowSizeIncludeBlobs() */ @@ -100,19 +114,24 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) - * @see java.sql.DatabaseMetaData#getAttributes(java.lang.String, java.lang.String, java.lang.String, java.lang.String) + /* + * (non-Javadoc) + * + * @see java.sql.DatabaseMetaData#getAttributes(java.lang.String, + * java.lang.String, java.lang.String, java.lang.String) */ public ResultSet getAttributes(String catalog, String schemaPattern, - String typeNamePattern, String attributeNamePattern) - throws SQLException { + String typeNamePattern, String attributeNamePattern) throws SQLException { // TODO Auto-generated method stub throw new SQLException("Method not supported"); } - /* (non-Javadoc) - * @see java.sql.DatabaseMetaData#getBestRowIdentifier(java.lang.String, java.lang.String, java.lang.String, int, boolean) + /* + * (non-Javadoc) + * + * @see java.sql.DatabaseMetaData#getBestRowIdentifier(java.lang.String, + * java.lang.String, java.lang.String, int, boolean) */ public ResultSet getBestRowIdentifier(String catalog, String schema, @@ -121,7 +140,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#getCatalogSeparator() */ @@ -130,7 +151,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#getCatalogTerm() */ @@ -139,7 +162,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#getCatalogs() */ @@ -148,7 +173,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#getClientInfoProperties() */ @@ -157,8 +184,11 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) - * @see java.sql.DatabaseMetaData#getColumnPrivileges(java.lang.String, java.lang.String, java.lang.String, java.lang.String) + /* + * (non-Javadoc) + * + * @see java.sql.DatabaseMetaData#getColumnPrivileges(java.lang.String, + * java.lang.String, java.lang.String, java.lang.String) */ public ResultSet getColumnPrivileges(String catalog, String schema, @@ -167,18 +197,22 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) - * @see java.sql.DatabaseMetaData#getColumns(java.lang.String, java.lang.String, java.lang.String, java.lang.String) + /* + * (non-Javadoc) + * + * @see java.sql.DatabaseMetaData#getColumns(java.lang.String, + * java.lang.String, java.lang.String, java.lang.String) */ public ResultSet getColumns(String catalog, String schemaPattern, - String tableNamePattern, String columnNamePattern) - throws SQLException { + String tableNamePattern, String columnNamePattern) throws SQLException { // TODO Auto-generated method stub throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#getConnection() */ @@ -187,8 +221,12 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) - * @see java.sql.DatabaseMetaData#getCrossReference(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String) + /* + * (non-Javadoc) + * + * @see java.sql.DatabaseMetaData#getCrossReference(java.lang.String, + * java.lang.String, java.lang.String, java.lang.String, java.lang.String, + * java.lang.String) */ public ResultSet getCrossReference(String primaryCatalog, @@ -198,7 +236,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#getDatabaseMajorVersion() */ @@ -207,7 +247,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#getDatabaseMinorVersion() */ @@ -216,7 +258,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#getDatabaseProductName() */ @@ -224,7 +268,9 @@ return "Hive"; } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#getDatabaseProductVersion() */ @@ -232,7 +278,9 @@ return "0"; } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#getDefaultTransactionIsolation() */ @@ -241,7 +289,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#getDriverMajorVersion() */ @@ -250,7 +300,9 @@ return 0; } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#getDriverMinorVersion() */ @@ -259,7 +311,9 @@ return 0; } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#getDriverName() */ @@ -267,16 +321,21 @@ return fetchManifestAttribute(Attributes.Name.IMPLEMENTATION_TITLE); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#getDriverVersion() */ public String getDriverVersion() throws SQLException { - return fetchManifestAttribute(Attributes.Name.IMPLEMENTATION_VERSION); + return fetchManifestAttribute(Attributes.Name.IMPLEMENTATION_VERSION); } - /* (non-Javadoc) - * @see java.sql.DatabaseMetaData#getExportedKeys(java.lang.String, java.lang.String, java.lang.String) + /* + * (non-Javadoc) + * + * @see java.sql.DatabaseMetaData#getExportedKeys(java.lang.String, + * java.lang.String, java.lang.String) */ public ResultSet getExportedKeys(String catalog, String schema, String table) @@ -285,7 +344,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#getExtraNameCharacters() */ @@ -294,8 +355,11 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) - * @see java.sql.DatabaseMetaData#getFunctionColumns(java.lang.String, java.lang.String, java.lang.String, java.lang.String) + /* + * (non-Javadoc) + * + * @see java.sql.DatabaseMetaData#getFunctionColumns(java.lang.String, + * java.lang.String, java.lang.String, java.lang.String) */ public ResultSet getFunctionColumns(String arg0, String arg1, String arg2, @@ -304,8 +368,11 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) - * @see java.sql.DatabaseMetaData#getFunctions(java.lang.String, java.lang.String, java.lang.String) + /* + * (non-Javadoc) + * + * @see java.sql.DatabaseMetaData#getFunctions(java.lang.String, + * java.lang.String, java.lang.String) */ public ResultSet getFunctions(String arg0, String arg1, String arg2) @@ -314,7 +381,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#getIdentifierQuoteString() */ @@ -323,8 +392,11 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) - * @see java.sql.DatabaseMetaData#getImportedKeys(java.lang.String, java.lang.String, java.lang.String) + /* + * (non-Javadoc) + * + * @see java.sql.DatabaseMetaData#getImportedKeys(java.lang.String, + * java.lang.String, java.lang.String) */ public ResultSet getImportedKeys(String catalog, String schema, String table) @@ -333,8 +405,11 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) - * @see java.sql.DatabaseMetaData#getIndexInfo(java.lang.String, java.lang.String, java.lang.String, boolean, boolean) + /* + * (non-Javadoc) + * + * @see java.sql.DatabaseMetaData#getIndexInfo(java.lang.String, + * java.lang.String, java.lang.String, boolean, boolean) */ public ResultSet getIndexInfo(String catalog, String schema, String table, @@ -343,7 +418,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#getJDBCMajorVersion() */ @@ -351,7 +428,9 @@ return 3; } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#getJDBCMinorVersion() */ @@ -359,7 +438,9 @@ return 0; } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#getMaxBinaryLiteralLength() */ @@ -368,7 +449,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#getMaxCatalogNameLength() */ @@ -377,7 +460,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#getMaxCharLiteralLength() */ @@ -386,7 +471,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#getMaxColumnNameLength() */ @@ -395,7 +482,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#getMaxColumnsInGroupBy() */ @@ -404,7 +493,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#getMaxColumnsInIndex() */ @@ -413,7 +504,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#getMaxColumnsInOrderBy() */ @@ -422,7 +515,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#getMaxColumnsInSelect() */ @@ -431,7 +526,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#getMaxColumnsInTable() */ @@ -440,7 +537,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#getMaxConnections() */ @@ -449,7 +548,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#getMaxCursorNameLength() */ @@ -458,7 +559,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#getMaxIndexLength() */ @@ -467,7 +570,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#getMaxProcedureNameLength() */ @@ -476,7 +581,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#getMaxRowSize() */ @@ -485,7 +592,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#getMaxSchemaNameLength() */ @@ -494,7 +603,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#getMaxStatementLength() */ @@ -503,7 +614,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#getMaxStatements() */ @@ -512,7 +625,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#getMaxTableNameLength() */ @@ -521,7 +636,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#getMaxTablesInSelect() */ @@ -530,7 +647,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#getMaxUserNameLength() */ @@ -539,7 +658,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#getNumericFunctions() */ @@ -548,8 +669,11 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) - * @see java.sql.DatabaseMetaData#getPrimaryKeys(java.lang.String, java.lang.String, java.lang.String) + /* + * (non-Javadoc) + * + * @see java.sql.DatabaseMetaData#getPrimaryKeys(java.lang.String, + * java.lang.String, java.lang.String) */ public ResultSet getPrimaryKeys(String catalog, String schema, String table) @@ -558,8 +682,11 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) - * @see java.sql.DatabaseMetaData#getProcedureColumns(java.lang.String, java.lang.String, java.lang.String, java.lang.String) + /* + * (non-Javadoc) + * + * @see java.sql.DatabaseMetaData#getProcedureColumns(java.lang.String, + * java.lang.String, java.lang.String, java.lang.String) */ public ResultSet getProcedureColumns(String catalog, String schemaPattern, @@ -569,7 +696,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#getProcedureTerm() */ @@ -578,17 +707,22 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) - * @see java.sql.DatabaseMetaData#getProcedures(java.lang.String, java.lang.String, java.lang.String) + /* + * (non-Javadoc) + * + * @see java.sql.DatabaseMetaData#getProcedures(java.lang.String, + * java.lang.String, java.lang.String) */ public ResultSet getProcedures(String catalog, String schemaPattern, String procedureNamePattern) throws SQLException { - //TODO: return empty result set here + // TODO: return empty result set here return null; } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#getResultSetHoldability() */ @@ -597,7 +731,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#getRowIdLifetime() */ @@ -606,7 +742,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#getSQLKeywords() */ @@ -615,7 +753,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#getSQLStateType() */ @@ -623,7 +763,9 @@ return DatabaseMetaData.sqlStateSQL99; } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#getSchemaTerm() */ @@ -632,7 +774,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#getSchemas() */ @@ -641,8 +785,11 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) - * @see java.sql.DatabaseMetaData#getSchemas(java.lang.String, java.lang.String) + /* + * (non-Javadoc) + * + * @see java.sql.DatabaseMetaData#getSchemas(java.lang.String, + * java.lang.String) */ public ResultSet getSchemas(String catalog, String schemaPattern) @@ -651,7 +798,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#getSearchStringEscape() */ @@ -660,7 +809,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#getStringFunctions() */ @@ -669,8 +820,11 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) - * @see java.sql.DatabaseMetaData#getSuperTables(java.lang.String, java.lang.String, java.lang.String) + /* + * (non-Javadoc) + * + * @see java.sql.DatabaseMetaData#getSuperTables(java.lang.String, + * java.lang.String, java.lang.String) */ public ResultSet getSuperTables(String catalog, String schemaPattern, @@ -679,8 +833,11 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) - * @see java.sql.DatabaseMetaData#getSuperTypes(java.lang.String, java.lang.String, java.lang.String) + /* + * (non-Javadoc) + * + * @see java.sql.DatabaseMetaData#getSuperTypes(java.lang.String, + * java.lang.String, java.lang.String) */ public ResultSet getSuperTypes(String catalog, String schemaPattern, @@ -689,7 +846,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#getSystemFunctions() */ @@ -698,8 +857,11 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) - * @see java.sql.DatabaseMetaData#getTablePrivileges(java.lang.String, java.lang.String, java.lang.String) + /* + * (non-Javadoc) + * + * @see java.sql.DatabaseMetaData#getTablePrivileges(java.lang.String, + * java.lang.String, java.lang.String) */ public ResultSet getTablePrivileges(String catalog, String schemaPattern, @@ -708,7 +870,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#getTableTypes() */ @@ -717,8 +881,11 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) - * @see java.sql.DatabaseMetaData#getTables(java.lang.String, java.lang.String, java.lang.String, java.lang.String[]) + /* + * (non-Javadoc) + * + * @see java.sql.DatabaseMetaData#getTables(java.lang.String, + * java.lang.String, java.lang.String, java.lang.String[]) */ public ResultSet getTables(String catalog, String schemaPattern, @@ -727,7 +894,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#getTimeDateFunctions() */ @@ -736,7 +905,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#getTypeInfo() */ @@ -745,8 +916,11 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) - * @see java.sql.DatabaseMetaData#getUDTs(java.lang.String, java.lang.String, java.lang.String, int[]) + /* + * (non-Javadoc) + * + * @see java.sql.DatabaseMetaData#getUDTs(java.lang.String, java.lang.String, + * java.lang.String, int[]) */ public ResultSet getUDTs(String catalog, String schemaPattern, @@ -755,7 +929,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#getURL() */ @@ -764,7 +940,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#getUserName() */ @@ -773,17 +951,22 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) - * @see java.sql.DatabaseMetaData#getVersionColumns(java.lang.String, java.lang.String, java.lang.String) + /* + * (non-Javadoc) + * + * @see java.sql.DatabaseMetaData#getVersionColumns(java.lang.String, + * java.lang.String, java.lang.String) */ - public ResultSet getVersionColumns(String catalog, String schema, - String table) throws SQLException { + public ResultSet getVersionColumns(String catalog, String schema, String table) + throws SQLException { // TODO Auto-generated method stub throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#insertsAreDetected(int) */ @@ -792,7 +975,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#isCatalogAtStart() */ @@ -801,7 +986,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#isReadOnly() */ @@ -810,7 +997,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#locatorsUpdateCopy() */ @@ -819,7 +1008,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#nullPlusNonNullIsNull() */ @@ -828,7 +1019,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#nullsAreSortedAtEnd() */ @@ -837,7 +1030,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#nullsAreSortedAtStart() */ @@ -846,7 +1041,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#nullsAreSortedHigh() */ @@ -855,7 +1052,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#nullsAreSortedLow() */ @@ -864,7 +1063,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#othersDeletesAreVisible(int) */ @@ -873,7 +1074,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#othersInsertsAreVisible(int) */ @@ -882,7 +1085,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#othersUpdatesAreVisible(int) */ @@ -891,7 +1096,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#ownDeletesAreVisible(int) */ @@ -900,7 +1107,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#ownInsertsAreVisible(int) */ @@ -909,7 +1118,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#ownUpdatesAreVisible(int) */ @@ -918,7 +1129,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#storesLowerCaseIdentifiers() */ @@ -927,7 +1140,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#storesLowerCaseQuotedIdentifiers() */ @@ -936,7 +1151,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#storesMixedCaseIdentifiers() */ @@ -945,7 +1162,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#storesMixedCaseQuotedIdentifiers() */ @@ -954,7 +1173,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#storesUpperCaseIdentifiers() */ @@ -963,7 +1184,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#storesUpperCaseQuotedIdentifiers() */ @@ -972,7 +1195,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#supportsANSI92EntryLevelSQL() */ @@ -981,7 +1206,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#supportsANSI92FullSQL() */ @@ -990,7 +1217,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#supportsANSI92IntermediateSQL() */ @@ -999,7 +1228,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#supportsAlterTableWithAddColumn() */ @@ -1008,7 +1239,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#supportsAlterTableWithDropColumn() */ @@ -1017,7 +1250,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#supportsBatchUpdates() */ @@ -1026,7 +1261,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#supportsCatalogsInDataManipulation() */ @@ -1035,7 +1272,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#supportsCatalogsInIndexDefinitions() */ @@ -1044,7 +1283,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#supportsCatalogsInPrivilegeDefinitions() */ @@ -1053,7 +1294,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#supportsCatalogsInProcedureCalls() */ @@ -1062,7 +1305,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#supportsCatalogsInTableDefinitions() */ @@ -1070,7 +1315,9 @@ return false; } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#supportsColumnAliasing() */ @@ -1079,7 +1326,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#supportsConvert() */ @@ -1088,17 +1337,20 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#supportsConvert(int, int) */ - public boolean supportsConvert(int fromType, int toType) - throws SQLException { + public boolean supportsConvert(int fromType, int toType) throws SQLException { // TODO Auto-generated method stub throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#supportsCoreSQLGrammar() */ @@ -1107,7 +1359,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#supportsCorrelatedSubqueries() */ @@ -1116,8 +1370,12 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) - * @see java.sql.DatabaseMetaData#supportsDataDefinitionAndDataManipulationTransactions() + /* + * (non-Javadoc) + * + * @see + * java.sql.DatabaseMetaData#supportsDataDefinitionAndDataManipulationTransactions + * () */ public boolean supportsDataDefinitionAndDataManipulationTransactions() @@ -1126,17 +1384,20 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#supportsDataManipulationTransactionsOnly() */ - public boolean supportsDataManipulationTransactionsOnly() - throws SQLException { + public boolean supportsDataManipulationTransactionsOnly() throws SQLException { // TODO Auto-generated method stub throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#supportsDifferentTableCorrelationNames() */ @@ -1145,7 +1406,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#supportsExpressionsInOrderBy() */ @@ -1154,7 +1417,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#supportsExtendedSQLGrammar() */ @@ -1163,7 +1428,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#supportsFullOuterJoins() */ @@ -1172,7 +1439,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#supportsGetGeneratedKeys() */ @@ -1181,7 +1450,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#supportsGroupBy() */ @@ -1190,7 +1461,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#supportsGroupByBeyondSelect() */ @@ -1199,7 +1472,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#supportsGroupByUnrelated() */ @@ -1208,7 +1483,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#supportsIntegrityEnhancementFacility() */ @@ -1217,7 +1494,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#supportsLikeEscapeClause() */ @@ -1226,7 +1505,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#supportsLimitedOuterJoins() */ @@ -1235,7 +1516,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#supportsMinimumSQLGrammar() */ @@ -1244,7 +1527,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#supportsMixedCaseIdentifiers() */ @@ -1253,7 +1538,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#supportsMixedCaseQuotedIdentifiers() */ @@ -1262,7 +1549,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#supportsMultipleOpenResults() */ @@ -1271,7 +1560,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#supportsMultipleResultSets() */ @@ -1279,7 +1570,9 @@ return false; } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#supportsMultipleTransactions() */ @@ -1288,7 +1581,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#supportsNamedParameters() */ @@ -1297,7 +1592,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#supportsNonNullableColumns() */ @@ -1306,7 +1603,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#supportsOpenCursorsAcrossCommit() */ @@ -1315,7 +1614,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#supportsOpenCursorsAcrossRollback() */ @@ -1324,7 +1625,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#supportsOpenStatementsAcrossCommit() */ @@ -1333,7 +1636,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#supportsOpenStatementsAcrossRollback() */ @@ -1342,7 +1647,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#supportsOrderByUnrelated() */ @@ -1351,7 +1658,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#supportsOuterJoins() */ @@ -1360,7 +1669,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#supportsPositionedDelete() */ @@ -1369,7 +1680,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#supportsPositionedUpdate() */ @@ -1378,7 +1691,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#supportsResultSetConcurrency(int, int) */ @@ -1388,7 +1703,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#supportsResultSetHoldability(int) */ @@ -1397,7 +1714,9 @@ return false; } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#supportsResultSetType(int) */ @@ -1405,7 +1724,9 @@ return true; } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#supportsSavepoints() */ @@ -1414,7 +1735,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#supportsSchemasInDataManipulation() */ @@ -1422,7 +1745,9 @@ return false; } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#supportsSchemasInIndexDefinitions() */ @@ -1431,7 +1756,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#supportsSchemasInPrivilegeDefinitions() */ @@ -1440,7 +1767,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#supportsSchemasInProcedureCalls() */ @@ -1449,7 +1778,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#supportsSchemasInTableDefinitions() */ @@ -1457,7 +1788,9 @@ return false; } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#supportsSelectForUpdate() */ @@ -1466,7 +1799,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#supportsStatementPooling() */ @@ -1475,7 +1810,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#supportsStoredFunctionsUsingCallSyntax() */ @@ -1484,7 +1821,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#supportsStoredProcedures() */ @@ -1492,7 +1831,9 @@ return false; } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#supportsSubqueriesInComparisons() */ @@ -1501,7 +1842,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#supportsSubqueriesInExists() */ @@ -1510,7 +1853,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#supportsSubqueriesInIns() */ @@ -1519,7 +1864,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#supportsSubqueriesInQuantifieds() */ @@ -1528,7 +1875,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#supportsTableCorrelationNames() */ @@ -1537,7 +1886,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#supportsTransactionIsolationLevel(int) */ @@ -1547,7 +1898,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#supportsTransactions() */ @@ -1556,7 +1909,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#supportsUnion() */ @@ -1565,7 +1920,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#supportsUnionAll() */ @@ -1574,7 +1931,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#updatesAreDetected(int) */ @@ -1583,7 +1942,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#usesLocalFilePerTable() */ @@ -1592,7 +1953,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.DatabaseMetaData#usesLocalFiles() */ @@ -1601,7 +1964,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Wrapper#isWrapperFor(java.lang.Class) */ @@ -1610,7 +1975,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Wrapper#unwrap(java.lang.Class) */ @@ -1626,26 +1993,32 @@ /** * Loads the manifest attributes from the jar. + * * @throws java.net.MalformedURLException * @throws IOException */ private synchronized void loadManifestAttributes() throws IOException { - if(manifestAttributes != null) return; + if (manifestAttributes != null) { + return; + } Class clazz = this.getClass(); - String classContainer = clazz.getProtectionDomain().getCodeSource().getLocation().toString(); - URL manifestUrl = new URL("jar:" + classContainer + "!/META-INF/MANIFEST.MF"); + String classContainer = clazz.getProtectionDomain().getCodeSource() + .getLocation().toString(); + URL manifestUrl = new URL("jar:" + classContainer + + "!/META-INF/MANIFEST.MF"); Manifest manifest = new Manifest(manifestUrl.openStream()); manifestAttributes = manifest.getMainAttributes(); } /** * Helper to initialize attributes and return one. - * + * * @param attributeName * @return * @throws SQLException */ - private String fetchManifestAttribute(Attributes.Name attributeName) throws SQLException { + private String fetchManifestAttribute(Attributes.Name attributeName) + throws SQLException { try { loadManifestAttributes(); } catch (IOException e) { @@ -1653,7 +2026,7 @@ } return manifestAttributes.getValue(attributeName); } - + public static void main(String[] args) throws SQLException { HiveDatabaseMetaData meta = new HiveDatabaseMetaData(); System.out.println("DriverName: " + meta.getDriverName()); Index: jdbc/src/java/org/apache/hadoop/hive/jdbc/HivePreparedStatement.java =================================================================== --- jdbc/src/java/org/apache/hadoop/hive/jdbc/HivePreparedStatement.java (revision 901519) +++ jdbc/src/java/org/apache/hadoop/hive/jdbc/HivePreparedStatement.java (working copy) @@ -42,23 +42,24 @@ import org.apache.hadoop.hive.service.HiveInterface; - public class HivePreparedStatement implements java.sql.PreparedStatement { String sql; JdbcSessionState session; HiveInterface client; - /** * */ - public HivePreparedStatement(JdbcSessionState session, HiveInterface client, String sql) { + public HivePreparedStatement(JdbcSessionState session, HiveInterface client, + String sql) { this.session = session; this.client = client; this.sql = sql; } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.PreparedStatement#addBatch() */ @@ -67,16 +68,20 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.PreparedStatement#clearParameters() */ public void clearParameters() throws SQLException { // TODO Auto-generated method stub - //throw new SQLException("Method not supported"); + // throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.PreparedStatement#execute() */ @@ -85,7 +90,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.PreparedStatement#executeQuery() */ @@ -98,7 +105,9 @@ return new HiveResultSet(client); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.PreparedStatement#executeUpdate() */ @@ -107,7 +116,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.PreparedStatement#getMetaData() */ @@ -116,7 +127,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.PreparedStatement#getParameterMetaData() */ @@ -125,7 +138,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.PreparedStatement#setArray(int, java.sql.Array) */ @@ -134,7 +149,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.PreparedStatement#setAsciiStream(int, java.io.InputStream) */ @@ -144,8 +161,11 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) - * @see java.sql.PreparedStatement#setAsciiStream(int, java.io.InputStream, int) + /* + * (non-Javadoc) + * + * @see java.sql.PreparedStatement#setAsciiStream(int, java.io.InputStream, + * int) */ public void setAsciiStream(int parameterIndex, InputStream x, int length) @@ -154,8 +174,11 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) - * @see java.sql.PreparedStatement#setAsciiStream(int, java.io.InputStream, long) + /* + * (non-Javadoc) + * + * @see java.sql.PreparedStatement#setAsciiStream(int, java.io.InputStream, + * long) */ public void setAsciiStream(int parameterIndex, InputStream x, long length) @@ -164,7 +187,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.PreparedStatement#setBigDecimal(int, java.math.BigDecimal) */ @@ -174,7 +199,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.PreparedStatement#setBinaryStream(int, java.io.InputStream) */ @@ -184,8 +211,11 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) - * @see java.sql.PreparedStatement#setBinaryStream(int, java.io.InputStream, int) + /* + * (non-Javadoc) + * + * @see java.sql.PreparedStatement#setBinaryStream(int, java.io.InputStream, + * int) */ public void setBinaryStream(int parameterIndex, InputStream x, int length) @@ -194,8 +224,11 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) - * @see java.sql.PreparedStatement#setBinaryStream(int, java.io.InputStream, long) + /* + * (non-Javadoc) + * + * @see java.sql.PreparedStatement#setBinaryStream(int, java.io.InputStream, + * long) */ public void setBinaryStream(int parameterIndex, InputStream x, long length) @@ -204,7 +237,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.PreparedStatement#setBlob(int, java.sql.Blob) */ @@ -213,7 +248,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.PreparedStatement#setBlob(int, java.io.InputStream) */ @@ -223,7 +260,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.PreparedStatement#setBlob(int, java.io.InputStream, long) */ @@ -233,7 +272,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.PreparedStatement#setBoolean(int, boolean) */ @@ -242,7 +283,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.PreparedStatement#setByte(int, byte) */ @@ -251,7 +294,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.PreparedStatement#setBytes(int, byte[]) */ @@ -260,7 +305,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.PreparedStatement#setCharacterStream(int, java.io.Reader) */ @@ -270,8 +317,11 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) - * @see java.sql.PreparedStatement#setCharacterStream(int, java.io.Reader, int) + /* + * (non-Javadoc) + * + * @see java.sql.PreparedStatement#setCharacterStream(int, java.io.Reader, + * int) */ public void setCharacterStream(int parameterIndex, Reader reader, int length) @@ -280,17 +330,22 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) - * @see java.sql.PreparedStatement#setCharacterStream(int, java.io.Reader, long) + /* + * (non-Javadoc) + * + * @see java.sql.PreparedStatement#setCharacterStream(int, java.io.Reader, + * long) */ - public void setCharacterStream(int parameterIndex, Reader reader, - long length) throws SQLException { + public void setCharacterStream(int parameterIndex, Reader reader, long length) + throws SQLException { // TODO Auto-generated method stub throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.PreparedStatement#setClob(int, java.sql.Clob) */ @@ -299,7 +354,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.PreparedStatement#setClob(int, java.io.Reader) */ @@ -308,7 +365,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.PreparedStatement#setClob(int, java.io.Reader, long) */ @@ -318,7 +377,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.PreparedStatement#setDate(int, java.sql.Date) */ @@ -327,8 +388,11 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) - * @see java.sql.PreparedStatement#setDate(int, java.sql.Date, java.util.Calendar) + /* + * (non-Javadoc) + * + * @see java.sql.PreparedStatement#setDate(int, java.sql.Date, + * java.util.Calendar) */ public void setDate(int parameterIndex, Date x, Calendar cal) @@ -337,7 +401,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.PreparedStatement#setDouble(int, double) */ @@ -346,7 +412,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.PreparedStatement#setFloat(int, float) */ @@ -355,7 +423,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.PreparedStatement#setInt(int, int) */ @@ -364,7 +434,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.PreparedStatement#setLong(int, long) */ @@ -373,7 +445,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.PreparedStatement#setNCharacterStream(int, java.io.Reader) */ @@ -383,17 +457,22 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) - * @see java.sql.PreparedStatement#setNCharacterStream(int, java.io.Reader, long) + /* + * (non-Javadoc) + * + * @see java.sql.PreparedStatement#setNCharacterStream(int, java.io.Reader, + * long) */ - public void setNCharacterStream(int parameterIndex, Reader value, - long length) throws SQLException { + public void setNCharacterStream(int parameterIndex, Reader value, long length) + throws SQLException { // TODO Auto-generated method stub throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.PreparedStatement#setNClob(int, java.sql.NClob) */ @@ -402,7 +481,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.PreparedStatement#setNClob(int, java.io.Reader) */ @@ -411,7 +492,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.PreparedStatement#setNClob(int, java.io.Reader, long) */ @@ -421,17 +504,20 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.PreparedStatement#setNString(int, java.lang.String) */ - public void setNString(int parameterIndex, String value) - throws SQLException { + public void setNString(int parameterIndex, String value) throws SQLException { // TODO Auto-generated method stub throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.PreparedStatement#setNull(int, int) */ @@ -440,7 +526,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.PreparedStatement#setNull(int, int, java.lang.String) */ @@ -450,7 +538,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.PreparedStatement#setObject(int, java.lang.Object) */ @@ -459,7 +549,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.PreparedStatement#setObject(int, java.lang.Object, int) */ @@ -469,7 +561,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.PreparedStatement#setObject(int, java.lang.Object, int, int) */ @@ -479,7 +573,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.PreparedStatement#setRef(int, java.sql.Ref) */ @@ -488,7 +584,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.PreparedStatement#setRowId(int, java.sql.RowId) */ @@ -497,7 +595,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.PreparedStatement#setSQLXML(int, java.sql.SQLXML) */ @@ -507,7 +607,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.PreparedStatement#setShort(int, short) */ @@ -516,7 +618,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.PreparedStatement#setString(int, java.lang.String) */ @@ -525,7 +629,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.PreparedStatement#setTime(int, java.sql.Time) */ @@ -534,8 +640,11 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) - * @see java.sql.PreparedStatement#setTime(int, java.sql.Time, java.util.Calendar) + /* + * (non-Javadoc) + * + * @see java.sql.PreparedStatement#setTime(int, java.sql.Time, + * java.util.Calendar) */ public void setTime(int parameterIndex, Time x, Calendar cal) @@ -544,18 +653,22 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.PreparedStatement#setTimestamp(int, java.sql.Timestamp) */ - public void setTimestamp(int parameterIndex, Timestamp x) - throws SQLException { + public void setTimestamp(int parameterIndex, Timestamp x) throws SQLException { // TODO Auto-generated method stub throw new SQLException("Method not supported"); } - /* (non-Javadoc) - * @see java.sql.PreparedStatement#setTimestamp(int, java.sql.Timestamp, java.util.Calendar) + /* + * (non-Javadoc) + * + * @see java.sql.PreparedStatement#setTimestamp(int, java.sql.Timestamp, + * java.util.Calendar) */ public void setTimestamp(int parameterIndex, Timestamp x, Calendar cal) @@ -564,7 +677,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.PreparedStatement#setURL(int, java.net.URL) */ @@ -573,8 +688,11 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) - * @see java.sql.PreparedStatement#setUnicodeStream(int, java.io.InputStream, int) + /* + * (non-Javadoc) + * + * @see java.sql.PreparedStatement#setUnicodeStream(int, java.io.InputStream, + * int) */ public void setUnicodeStream(int parameterIndex, InputStream x, int length) @@ -583,7 +701,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#addBatch(java.lang.String) */ @@ -592,7 +712,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#cancel() */ @@ -601,7 +723,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#clearBatch() */ @@ -610,7 +734,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#clearWarnings() */ @@ -619,7 +745,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#close() */ @@ -628,7 +756,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#execute(java.lang.String) */ @@ -637,17 +767,20 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#execute(java.lang.String, int) */ - public boolean execute(String sql, int autoGeneratedKeys) - throws SQLException { + public boolean execute(String sql, int autoGeneratedKeys) throws SQLException { // TODO Auto-generated method stub throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#execute(java.lang.String, int[]) */ @@ -656,17 +789,20 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#execute(java.lang.String, java.lang.String[]) */ - public boolean execute(String sql, String[] columnNames) - throws SQLException { + public boolean execute(String sql, String[] columnNames) throws SQLException { // TODO Auto-generated method stub throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#executeBatch() */ @@ -675,7 +811,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#executeQuery(java.lang.String) */ @@ -684,7 +822,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#executeUpdate(java.lang.String) */ @@ -693,7 +833,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#executeUpdate(java.lang.String, int) */ @@ -703,17 +845,20 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#executeUpdate(java.lang.String, int[]) */ - public int executeUpdate(String sql, int[] columnIndexes) - throws SQLException { + public int executeUpdate(String sql, int[] columnIndexes) throws SQLException { // TODO Auto-generated method stub throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#executeUpdate(java.lang.String, java.lang.String[]) */ @@ -723,7 +868,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#getConnection() */ @@ -732,7 +879,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#getFetchDirection() */ @@ -741,7 +890,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#getFetchSize() */ @@ -750,7 +901,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#getGeneratedKeys() */ @@ -759,7 +912,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#getMaxFieldSize() */ @@ -768,7 +923,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#getMaxRows() */ @@ -777,7 +934,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#getMoreResults() */ @@ -786,7 +945,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#getMoreResults(int) */ @@ -795,7 +956,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#getQueryTimeout() */ @@ -804,7 +967,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#getResultSet() */ @@ -813,7 +978,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#getResultSetConcurrency() */ @@ -822,7 +989,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#getResultSetHoldability() */ @@ -831,7 +1000,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#getResultSetType() */ @@ -840,7 +1011,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#getUpdateCount() */ @@ -849,7 +1022,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#getWarnings() */ @@ -858,7 +1033,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#isClosed() */ @@ -867,7 +1044,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#isPoolable() */ @@ -876,7 +1055,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#setCursorName(java.lang.String) */ @@ -885,7 +1066,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#setEscapeProcessing(boolean) */ @@ -894,7 +1077,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#setFetchDirection(int) */ @@ -903,7 +1088,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#setFetchSize(int) */ @@ -912,7 +1099,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#setMaxFieldSize(int) */ @@ -921,16 +1110,20 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#setMaxRows(int) */ public void setMaxRows(int max) throws SQLException { // TODO Auto-generated method stub - //throw new SQLException("Method not supported"); + // throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#setPoolable(boolean) */ @@ -939,7 +1132,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Statement#setQueryTimeout(int) */ @@ -948,7 +1143,9 @@ // throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Wrapper#isWrapperFor(java.lang.Class) */ @@ -957,7 +1154,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Wrapper#unwrap(java.lang.Class) */ Index: jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveDataSource.java =================================================================== --- jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveDataSource.java (revision 901519) +++ jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveDataSource.java (working copy) @@ -24,7 +24,6 @@ import javax.sql.DataSource; - public class HiveDataSource implements DataSource { /** @@ -34,15 +33,19 @@ // TODO Auto-generated constructor stub } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see javax.sql.DataSource#getConnection() */ public Connection getConnection() throws SQLException { - return getConnection("",""); + return getConnection("", ""); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see javax.sql.DataSource#getConnection(java.lang.String, java.lang.String) */ @@ -55,7 +58,9 @@ } } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see javax.sql.CommonDataSource#getLogWriter() */ @@ -64,7 +69,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see javax.sql.CommonDataSource#getLoginTimeout() */ @@ -73,7 +80,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see javax.sql.CommonDataSource#setLogWriter(java.io.PrintWriter) */ @@ -82,7 +91,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see javax.sql.CommonDataSource#setLoginTimeout(int) */ @@ -91,7 +102,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Wrapper#isWrapperFor(java.lang.Class) */ @@ -100,7 +113,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Wrapper#unwrap(java.lang.Class) */ Index: jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveResultSet.java =================================================================== --- jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveResultSet.java (revision 901519) +++ jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveResultSet.java (working copy) @@ -36,21 +36,20 @@ import java.sql.Statement; import java.sql.Time; import java.sql.Timestamp; +import java.util.ArrayList; import java.util.Calendar; +import java.util.List; import java.util.Map; -import java.util.List; -import java.util.ArrayList; import java.util.Properties; +import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hive.metastore.api.FieldSchema; import org.apache.hadoop.hive.metastore.api.Schema; +import org.apache.hadoop.hive.serde.Constants; import org.apache.hadoop.hive.serde2.dynamic_type.DynamicSerDe; -import org.apache.hadoop.hive.serde.Constants; -import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hive.service.HiveInterface; import org.apache.hadoop.io.BytesWritable; - public class HiveResultSet implements java.sql.ResultSet { HiveInterface client; ArrayList row; @@ -69,7 +68,7 @@ @SuppressWarnings("unchecked") public HiveResultSet(HiveInterface client, int maxRows) throws SQLException { this.client = client; - this.row = new ArrayList(); + row = new ArrayList(); this.maxRows = maxRows; initDynamicSerde(); } @@ -88,14 +87,15 @@ List schema = fullSchema.getFieldSchemas(); columnNames = new ArrayList(); columnTypes = new ArrayList(); - + String serDDL; if ((schema != null) && (!schema.isEmpty())) { serDDL = new String("struct result { "); for (int pos = 0; pos < schema.size(); pos++) { - if (pos != 0) + if (pos != 0) { serDDL = serDDL.concat(","); + } columnTypes.add(schema.get(pos).getType()); columnNames.add(schema.get(pos).getName()); serDDL = serDDL.concat(schema.get(pos).getType()); @@ -103,14 +103,18 @@ serDDL = serDDL.concat(schema.get(pos).getName()); } serDDL = serDDL.concat("}"); + } else { + serDDL = new String("struct result { string empty }"); } - else - serDDL = new String("struct result { string empty }"); ds = new DynamicSerDe(); Properties dsp = new Properties(); - dsp.setProperty(Constants.SERIALIZATION_FORMAT, org.apache.hadoop.hive.serde2.thrift.TCTLSeparatedProtocol.class.getName()); - dsp.setProperty(org.apache.hadoop.hive.metastore.api.Constants.META_TABLE_NAME, "result"); + dsp.setProperty(Constants.SERIALIZATION_FORMAT, + org.apache.hadoop.hive.serde2.thrift.TCTLSeparatedProtocol.class + .getName()); + dsp.setProperty( + org.apache.hadoop.hive.metastore.api.Constants.META_TABLE_NAME, + "result"); dsp.setProperty(Constants.SERIALIZATION_DDL, serDDL); dsp.setProperty(Constants.SERIALIZATION_LIB, ds.getClass().toString()); dsp.setProperty(Constants.FIELD_DELIM, "9"); @@ -121,7 +125,9 @@ } } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#absolute(int) */ @@ -130,7 +136,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#afterLast() */ @@ -139,7 +147,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#beforeFirst() */ @@ -148,7 +158,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#cancelRowUpdates() */ @@ -157,7 +169,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#clearWarnings() */ @@ -165,7 +179,9 @@ warningChain = null; } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#close() */ @@ -174,7 +190,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#deleteRow() */ @@ -183,7 +201,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#findColumn(java.lang.String) */ @@ -192,7 +212,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#first() */ @@ -201,7 +223,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#getArray(int) */ @@ -210,7 +234,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#getArray(java.lang.String) */ @@ -219,7 +245,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#getAsciiStream(int) */ @@ -228,7 +256,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#getAsciiStream(java.lang.String) */ @@ -237,7 +267,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#getBigDecimal(int) */ @@ -246,7 +278,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#getBigDecimal(java.lang.String) */ @@ -255,7 +289,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#getBigDecimal(int, int) */ @@ -265,7 +301,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#getBigDecimal(java.lang.String, int) */ @@ -275,7 +313,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#getBinaryStream(int) */ @@ -284,7 +324,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#getBinaryStream(java.lang.String) */ @@ -293,7 +335,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#getBlob(int) */ @@ -302,7 +346,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#getBlob(java.lang.String) */ @@ -311,19 +357,24 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#getBoolean(int) */ public boolean getBoolean(int columnIndex) throws SQLException { Object obj = getObject(columnIndex); if (Number.class.isInstance(obj)) { - return ((Number)obj).intValue() != 0; + return ((Number) obj).intValue() != 0; } - throw new SQLException("Cannot convert column " + columnIndex + " to boolean"); + throw new SQLException("Cannot convert column " + columnIndex + + " to boolean"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#getBoolean(java.lang.String) */ @@ -332,19 +383,23 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#getByte(int) */ public byte getByte(int columnIndex) throws SQLException { Object obj = getObject(columnIndex); if (Number.class.isInstance(obj)) { - return ((Number)obj).byteValue(); + return ((Number) obj).byteValue(); } throw new SQLException("Cannot convert column " + columnIndex + " to byte"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#getByte(java.lang.String) */ @@ -353,7 +408,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#getBytes(int) */ @@ -362,7 +419,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#getBytes(java.lang.String) */ @@ -371,7 +430,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#getCharacterStream(int) */ @@ -380,7 +441,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#getCharacterStream(java.lang.String) */ @@ -389,7 +452,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#getClob(int) */ @@ -398,7 +463,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#getClob(java.lang.String) */ @@ -407,7 +474,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#getConcurrency() */ @@ -416,7 +485,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#getCursorName() */ @@ -425,23 +496,29 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#getDate(int) */ public Date getDate(int columnIndex) throws SQLException { Object obj = getObject(columnIndex); - if (obj == null) return null; + if (obj == null) { + return null; + } try { - return Date.valueOf((String)obj); + return Date.valueOf((String) obj); + } catch (Exception e) { + throw new SQLException("Cannot convert column " + columnIndex + + " to date: " + e.toString()); } - catch (Exception e) { - throw new SQLException("Cannot convert column " + columnIndex + " to date: " + e.toString()); - } } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#getDate(java.lang.String) */ @@ -450,7 +527,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#getDate(int, java.util.Calendar) */ @@ -459,7 +538,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#getDate(java.lang.String, java.util.Calendar) */ @@ -468,7 +549,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#getDouble(int) */ @@ -476,16 +559,18 @@ try { Object obj = getObject(columnIndex); if (Number.class.isInstance(obj)) { - return ((Number)obj).doubleValue(); + return ((Number) obj).doubleValue(); } throw new Exception("Illegal conversion"); + } catch (Exception e) { + throw new SQLException("Cannot convert column " + columnIndex + + " to double: " + e.toString()); } - catch (Exception e) { - throw new SQLException("Cannot convert column " + columnIndex + " to double: " + e.toString()); - } } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#getDouble(java.lang.String) */ @@ -494,7 +579,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#getFetchDirection() */ @@ -503,7 +590,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#getFetchSize() */ @@ -512,7 +601,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#getFloat(int) */ @@ -520,16 +611,18 @@ try { Object obj = getObject(columnIndex); if (Number.class.isInstance(obj)) { - return ((Number)obj).floatValue(); + return ((Number) obj).floatValue(); } throw new Exception("Illegal conversion"); + } catch (Exception e) { + throw new SQLException("Cannot convert column " + columnIndex + + " to float: " + e.toString()); } - catch (Exception e) { - throw new SQLException("Cannot convert column " + columnIndex + " to float: " + e.toString()); - } } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#getFloat(java.lang.String) */ @@ -537,7 +630,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#getHoldability() */ @@ -546,7 +641,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#getInt(int) */ @@ -554,16 +651,18 @@ try { Object obj = getObject(columnIndex); if (Number.class.isInstance(obj)) { - return ((Number)obj).intValue(); + return ((Number) obj).intValue(); } throw new Exception("Illegal conversion"); + } catch (Exception e) { + throw new SQLException("Cannot convert column " + columnIndex + + " to integer" + e.toString()); } - catch (Exception e) { - throw new SQLException("Cannot convert column " + columnIndex + " to integer" + e.toString()); - } } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#getInt(java.lang.String) */ @@ -572,7 +671,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#getLong(int) */ @@ -580,16 +681,18 @@ try { Object obj = getObject(columnIndex); if (Number.class.isInstance(obj)) { - return ((Number)obj).longValue(); + return ((Number) obj).longValue(); } throw new Exception("Illegal conversion"); + } catch (Exception e) { + throw new SQLException("Cannot convert column " + columnIndex + + " to long: " + e.toString()); } - catch (Exception e) { - throw new SQLException("Cannot convert column " + columnIndex + " to long: " + e.toString()); - } } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#getLong(java.lang.String) */ @@ -598,7 +701,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#getMetaData() */ @@ -606,7 +711,9 @@ return new HiveResultSetMetaData(columnNames, columnTypes); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#getNCharacterStream(int) */ @@ -615,7 +722,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#getNCharacterStream(java.lang.String) */ @@ -624,7 +733,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#getNClob(int) */ @@ -633,7 +744,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#getNClob(java.lang.String) */ @@ -642,7 +755,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#getNString(int) */ @@ -651,7 +766,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#getNString(java.lang.String) */ @@ -660,7 +777,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#getObject(int) */ @@ -674,17 +793,20 @@ } try { - this.wasNull = false; - if (row.get(columnIndex-1) == null) this.wasNull = true; + wasNull = false; + if (row.get(columnIndex - 1) == null) { + wasNull = true; + } - return row.get(columnIndex-1); - } - catch (Exception e) { + return row.get(columnIndex - 1); + } catch (Exception e) { throw new SQLException(e.toString()); } } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#getObject(java.lang.String) */ @@ -693,17 +815,20 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#getObject(int, java.util.Map) */ - public Object getObject(int i, Map> map) - throws SQLException { + public Object getObject(int i, Map> map) throws SQLException { // TODO Auto-generated method stub throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#getObject(java.lang.String, java.util.Map) */ @@ -713,7 +838,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#getRef(int) */ @@ -722,7 +849,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#getRef(java.lang.String) */ @@ -731,7 +860,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#getRow() */ @@ -740,7 +871,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#getRowId(int) */ @@ -749,7 +882,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#getRowId(java.lang.String) */ @@ -758,7 +893,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#getSQLXML(int) */ @@ -767,7 +904,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#getSQLXML(java.lang.String) */ @@ -776,7 +915,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#getShort(int) */ @@ -784,16 +925,18 @@ try { Object obj = getObject(columnIndex); if (Number.class.isInstance(obj)) { - return ((Number)obj).shortValue(); + return ((Number) obj).shortValue(); } throw new Exception("Illegal conversion"); + } catch (Exception e) { + throw new SQLException("Cannot convert column " + columnIndex + + " to short: " + e.toString()); } - catch (Exception e) { - throw new SQLException("Cannot convert column " + columnIndex + " to short: " + e.toString()); - } } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#getShort(java.lang.String) */ @@ -802,7 +945,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#getStatement() */ @@ -812,19 +957,24 @@ } /** - * @param columnIndex - the first column is 1, the second is 2, ... + * @param columnIndex + * - the first column is 1, the second is 2, ... * @see java.sql.ResultSet#getString(int) */ public String getString(int columnIndex) throws SQLException { // Column index starts from 1, not 0. Object obj = getObject(columnIndex); - if (obj == null) return null; + if (obj == null) { + return null; + } return obj.toString(); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#getString(java.lang.String) */ @@ -833,7 +983,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#getTime(int) */ @@ -842,7 +994,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#getTime(java.lang.String) */ @@ -851,7 +1005,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#getTime(int, java.util.Calendar) */ @@ -860,7 +1016,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#getTime(java.lang.String, java.util.Calendar) */ @@ -869,7 +1027,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#getTimestamp(int) */ @@ -878,7 +1038,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#getTimestamp(java.lang.String) */ @@ -887,7 +1049,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#getTimestamp(int, java.util.Calendar) */ @@ -897,7 +1061,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#getTimestamp(java.lang.String, java.util.Calendar) */ @@ -907,7 +1073,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#getType() */ @@ -916,7 +1084,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#getURL(int) */ @@ -925,7 +1095,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#getURL(java.lang.String) */ @@ -934,7 +1106,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#getUnicodeStream(int) */ @@ -943,7 +1117,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#getUnicodeStream(java.lang.String) */ @@ -952,7 +1128,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#getWarnings() */ @@ -960,7 +1138,9 @@ return warningChain; } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#insertRow() */ @@ -969,7 +1149,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#isAfterLast() */ @@ -978,7 +1160,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#isBeforeFirst() */ @@ -987,7 +1171,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#isClosed() */ @@ -996,7 +1182,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#isFirst() */ @@ -1005,7 +1193,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#isLast() */ @@ -1014,7 +1204,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#last() */ @@ -1023,7 +1215,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#moveToCurrentRow() */ @@ -1032,7 +1226,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#moveToInsertRow() */ @@ -1043,21 +1239,24 @@ /** * Moves the cursor down one row from its current position. - * + * * @see java.sql.ResultSet#next() - * @throws SQLException if a database access error occurs. + * @throws SQLException + * if a database access error occurs. */ public boolean next() throws SQLException { - if (this.maxRows > 0 && this.rowsFetched >= this.maxRows) return false; + if (maxRows > 0 && rowsFetched >= maxRows) { + return false; + } String row_str = ""; try { - row_str = (String)client.fetchOne(); - this.rowsFetched++; + row_str = (String) client.fetchOne(); + rowsFetched++; if (!row_str.equals("")) { Object o = ds.deserialize(new BytesWritable(row_str.getBytes())); - row = (ArrayList)o; + row = (ArrayList) o; } } catch (Exception ex) { ex.printStackTrace(); @@ -1067,7 +1266,9 @@ return !row_str.equals(""); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#previous() */ @@ -1076,7 +1277,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#refreshRow() */ @@ -1085,7 +1288,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#relative(int) */ @@ -1094,7 +1299,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#rowDeleted() */ @@ -1103,7 +1310,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#rowInserted() */ @@ -1112,7 +1321,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#rowUpdated() */ @@ -1121,7 +1332,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#setFetchDirection(int) */ @@ -1130,7 +1343,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#setFetchSize(int) */ @@ -1139,7 +1354,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#updateArray(int, java.sql.Array) */ @@ -1148,7 +1365,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#updateArray(java.lang.String, java.sql.Array) */ @@ -1157,7 +1376,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#updateAsciiStream(int, java.io.InputStream) */ @@ -1167,8 +1388,11 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) - * @see java.sql.ResultSet#updateAsciiStream(java.lang.String, java.io.InputStream) + /* + * (non-Javadoc) + * + * @see java.sql.ResultSet#updateAsciiStream(java.lang.String, + * java.io.InputStream) */ public void updateAsciiStream(String columnLabel, InputStream x) @@ -1177,7 +1401,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#updateAsciiStream(int, java.io.InputStream, int) */ @@ -1187,8 +1413,11 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) - * @see java.sql.ResultSet#updateAsciiStream(java.lang.String, java.io.InputStream, int) + /* + * (non-Javadoc) + * + * @see java.sql.ResultSet#updateAsciiStream(java.lang.String, + * java.io.InputStream, int) */ public void updateAsciiStream(String columnName, InputStream x, int length) @@ -1197,7 +1426,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#updateAsciiStream(int, java.io.InputStream, long) */ @@ -1207,8 +1438,11 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) - * @see java.sql.ResultSet#updateAsciiStream(java.lang.String, java.io.InputStream, long) + /* + * (non-Javadoc) + * + * @see java.sql.ResultSet#updateAsciiStream(java.lang.String, + * java.io.InputStream, long) */ public void updateAsciiStream(String columnLabel, InputStream x, long length) @@ -1217,7 +1451,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#updateBigDecimal(int, java.math.BigDecimal) */ @@ -1227,8 +1463,11 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) - * @see java.sql.ResultSet#updateBigDecimal(java.lang.String, java.math.BigDecimal) + /* + * (non-Javadoc) + * + * @see java.sql.ResultSet#updateBigDecimal(java.lang.String, + * java.math.BigDecimal) */ public void updateBigDecimal(String columnName, BigDecimal x) @@ -1237,7 +1476,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#updateBinaryStream(int, java.io.InputStream) */ @@ -1247,8 +1488,11 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) - * @see java.sql.ResultSet#updateBinaryStream(java.lang.String, java.io.InputStream) + /* + * (non-Javadoc) + * + * @see java.sql.ResultSet#updateBinaryStream(java.lang.String, + * java.io.InputStream) */ public void updateBinaryStream(String columnLabel, InputStream x) @@ -1257,7 +1501,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#updateBinaryStream(int, java.io.InputStream, int) */ @@ -1267,8 +1513,11 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) - * @see java.sql.ResultSet#updateBinaryStream(java.lang.String, java.io.InputStream, int) + /* + * (non-Javadoc) + * + * @see java.sql.ResultSet#updateBinaryStream(java.lang.String, + * java.io.InputStream, int) */ public void updateBinaryStream(String columnName, InputStream x, int length) @@ -1277,7 +1526,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#updateBinaryStream(int, java.io.InputStream, long) */ @@ -1287,17 +1538,22 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) - * @see java.sql.ResultSet#updateBinaryStream(java.lang.String, java.io.InputStream, long) + /* + * (non-Javadoc) + * + * @see java.sql.ResultSet#updateBinaryStream(java.lang.String, + * java.io.InputStream, long) */ - public void updateBinaryStream(String columnLabel, InputStream x, - long length) throws SQLException { + public void updateBinaryStream(String columnLabel, InputStream x, long length) + throws SQLException { // TODO Auto-generated method stub throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#updateBlob(int, java.sql.Blob) */ @@ -1306,7 +1562,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#updateBlob(java.lang.String, java.sql.Blob) */ @@ -1315,7 +1573,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#updateBlob(int, java.io.InputStream) */ @@ -1325,7 +1585,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#updateBlob(java.lang.String, java.io.InputStream) */ @@ -1335,7 +1597,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#updateBlob(int, java.io.InputStream, long) */ @@ -1345,8 +1609,11 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) - * @see java.sql.ResultSet#updateBlob(java.lang.String, java.io.InputStream, long) + /* + * (non-Javadoc) + * + * @see java.sql.ResultSet#updateBlob(java.lang.String, java.io.InputStream, + * long) */ public void updateBlob(String columnLabel, InputStream inputStream, @@ -1355,7 +1622,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#updateBoolean(int, boolean) */ @@ -1364,7 +1633,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#updateBoolean(java.lang.String, boolean) */ @@ -1373,7 +1644,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#updateByte(int, byte) */ @@ -1382,7 +1655,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#updateByte(java.lang.String, byte) */ @@ -1391,7 +1666,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#updateBytes(int, byte[]) */ @@ -1400,7 +1677,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#updateBytes(java.lang.String, byte[]) */ @@ -1409,7 +1688,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#updateCharacterStream(int, java.io.Reader) */ @@ -1419,8 +1700,11 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) - * @see java.sql.ResultSet#updateCharacterStream(java.lang.String, java.io.Reader) + /* + * (non-Javadoc) + * + * @see java.sql.ResultSet#updateCharacterStream(java.lang.String, + * java.io.Reader) */ public void updateCharacterStream(String columnLabel, Reader reader) @@ -1429,7 +1713,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#updateCharacterStream(int, java.io.Reader, int) */ @@ -1439,17 +1725,22 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) - * @see java.sql.ResultSet#updateCharacterStream(java.lang.String, java.io.Reader, int) + /* + * (non-Javadoc) + * + * @see java.sql.ResultSet#updateCharacterStream(java.lang.String, + * java.io.Reader, int) */ - public void updateCharacterStream(String columnName, Reader reader, - int length) throws SQLException { + public void updateCharacterStream(String columnName, Reader reader, int length) + throws SQLException { // TODO Auto-generated method stub throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#updateCharacterStream(int, java.io.Reader, long) */ @@ -1459,8 +1750,11 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) - * @see java.sql.ResultSet#updateCharacterStream(java.lang.String, java.io.Reader, long) + /* + * (non-Javadoc) + * + * @see java.sql.ResultSet#updateCharacterStream(java.lang.String, + * java.io.Reader, long) */ public void updateCharacterStream(String columnLabel, Reader reader, @@ -1469,7 +1763,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#updateClob(int, java.sql.Clob) */ @@ -1478,7 +1774,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#updateClob(java.lang.String, java.sql.Clob) */ @@ -1487,7 +1785,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#updateClob(int, java.io.Reader) */ @@ -1496,17 +1796,20 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#updateClob(java.lang.String, java.io.Reader) */ - public void updateClob(String columnLabel, Reader reader) - throws SQLException { + public void updateClob(String columnLabel, Reader reader) throws SQLException { // TODO Auto-generated method stub throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#updateClob(int, java.io.Reader, long) */ @@ -1516,7 +1819,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#updateClob(java.lang.String, java.io.Reader, long) */ @@ -1526,7 +1831,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#updateDate(int, java.sql.Date) */ @@ -1535,7 +1842,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#updateDate(java.lang.String, java.sql.Date) */ @@ -1544,7 +1853,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#updateDouble(int, double) */ @@ -1553,7 +1864,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#updateDouble(java.lang.String, double) */ @@ -1562,7 +1875,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#updateFloat(int, float) */ @@ -1571,7 +1886,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#updateFloat(java.lang.String, float) */ @@ -1580,7 +1897,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#updateInt(int, int) */ @@ -1589,7 +1908,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#updateInt(java.lang.String, int) */ @@ -1598,7 +1919,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#updateLong(int, long) */ @@ -1607,7 +1930,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#updateLong(java.lang.String, long) */ @@ -1616,7 +1941,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#updateNCharacterStream(int, java.io.Reader) */ @@ -1626,8 +1953,11 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) - * @see java.sql.ResultSet#updateNCharacterStream(java.lang.String, java.io.Reader) + /* + * (non-Javadoc) + * + * @see java.sql.ResultSet#updateNCharacterStream(java.lang.String, + * java.io.Reader) */ public void updateNCharacterStream(String columnLabel, Reader reader) @@ -1636,7 +1966,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#updateNCharacterStream(int, java.io.Reader, long) */ @@ -1646,8 +1978,11 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) - * @see java.sql.ResultSet#updateNCharacterStream(java.lang.String, java.io.Reader, long) + /* + * (non-Javadoc) + * + * @see java.sql.ResultSet#updateNCharacterStream(java.lang.String, + * java.io.Reader, long) */ public void updateNCharacterStream(String columnLabel, Reader reader, @@ -1656,7 +1991,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#updateNClob(int, java.sql.NClob) */ @@ -1665,7 +2002,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#updateNClob(java.lang.String, java.sql.NClob) */ @@ -1674,7 +2013,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#updateNClob(int, java.io.Reader) */ @@ -1683,7 +2024,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#updateNClob(java.lang.String, java.io.Reader) */ @@ -1693,7 +2036,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#updateNClob(int, java.io.Reader, long) */ @@ -1703,7 +2048,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#updateNClob(java.lang.String, java.io.Reader, long) */ @@ -1713,17 +2060,20 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#updateNString(int, java.lang.String) */ - public void updateNString(int columnIndex, String string) - throws SQLException { + public void updateNString(int columnIndex, String string) throws SQLException { // TODO Auto-generated method stub throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#updateNString(java.lang.String, java.lang.String) */ @@ -1733,7 +2083,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#updateNull(int) */ @@ -1742,7 +2094,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#updateNull(java.lang.String) */ @@ -1751,7 +2105,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#updateObject(int, java.lang.Object) */ @@ -1760,7 +2116,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#updateObject(java.lang.String, java.lang.Object) */ @@ -1769,7 +2127,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#updateObject(int, java.lang.Object, int) */ @@ -1779,8 +2139,11 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) - * @see java.sql.ResultSet#updateObject(java.lang.String, java.lang.Object, int) + /* + * (non-Javadoc) + * + * @see java.sql.ResultSet#updateObject(java.lang.String, java.lang.Object, + * int) */ public void updateObject(String columnName, Object x, int scale) @@ -1789,7 +2152,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#updateRef(int, java.sql.Ref) */ @@ -1798,7 +2163,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#updateRef(java.lang.String, java.sql.Ref) */ @@ -1807,7 +2174,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#updateRow() */ @@ -1816,7 +2185,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#updateRowId(int, java.sql.RowId) */ @@ -1825,7 +2196,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#updateRowId(java.lang.String, java.sql.RowId) */ @@ -1834,7 +2207,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#updateSQLXML(int, java.sql.SQLXML) */ @@ -1844,7 +2219,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#updateSQLXML(java.lang.String, java.sql.SQLXML) */ @@ -1854,7 +2231,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#updateShort(int, short) */ @@ -1863,7 +2242,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#updateShort(java.lang.String, short) */ @@ -1872,7 +2253,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#updateString(int, java.lang.String) */ @@ -1881,7 +2264,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#updateString(java.lang.String, java.lang.String) */ @@ -1890,7 +2275,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#updateTime(int, java.sql.Time) */ @@ -1899,7 +2286,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#updateTime(java.lang.String, java.sql.Time) */ @@ -1908,18 +2297,22 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#updateTimestamp(int, java.sql.Timestamp) */ - public void updateTimestamp(int columnIndex, Timestamp x) - throws SQLException { + public void updateTimestamp(int columnIndex, Timestamp x) throws SQLException { // TODO Auto-generated method stub throw new SQLException("Method not supported"); } - /* (non-Javadoc) - * @see java.sql.ResultSet#updateTimestamp(java.lang.String, java.sql.Timestamp) + /* + * (non-Javadoc) + * + * @see java.sql.ResultSet#updateTimestamp(java.lang.String, + * java.sql.Timestamp) */ public void updateTimestamp(String columnName, Timestamp x) @@ -1928,15 +2321,19 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSet#wasNull() */ public boolean wasNull() throws SQLException { - return this.wasNull; + return wasNull; } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Wrapper#isWrapperFor(java.lang.Class) */ @@ -1945,7 +2342,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Wrapper#unwrap(java.lang.Class) */ Index: jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveDriver.java =================================================================== --- jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveDriver.java (revision 901519) +++ jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveDriver.java (working copy) @@ -18,16 +18,17 @@ package org.apache.hadoop.hive.jdbc; -import java.sql.*; -import java.sql.DriverManager; +import java.sql.Connection; +import java.sql.DriverPropertyInfo; +import java.sql.SQLException; import java.util.Properties; import java.util.regex.Pattern; - public class HiveDriver implements java.sql.Driver { static { - try { - java.sql.DriverManager.registerDriver(new org.apache.hadoop.hive.jdbc.HiveDriver()); + try { + java.sql.DriverManager + .registerDriver(new org.apache.hadoop.hive.jdbc.HiveDriver()); } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); @@ -87,23 +88,20 @@ /** * Checks whether a given url is in a valid format. - * - * The current uri format is: - * jdbc:hive://[host[:port]] - * - * jdbc:hive:// - run in embedded mode - * jdbc:hive://localhost - connect to localhost default port (10000) - * jdbc:hive://localhost:5050 - connect to localhost port 5050 - * - * TODO: - write a better regex. - * - decide on uri format + * + * The current uri format is: jdbc:hive://[host[:port]] + * + * jdbc:hive:// - run in embedded mode jdbc:hive://localhost - connect to + * localhost default port (10000) jdbc:hive://localhost:5050 - connect to + * localhost port 5050 + * + * TODO: - write a better regex. - decide on uri format */ public boolean acceptsURL(String url) throws SQLException { - return Pattern.matches(URL_PREFIX+".*", url); + return Pattern.matches(URL_PREFIX + ".*", url); } - public Connection connect(String url, Properties info) throws SQLException { return new HiveConnection(url, info); } @@ -135,17 +133,17 @@ } DriverPropertyInfo hostProp = new DriverPropertyInfo(HOST_PROPERTY_KEY, - info.getProperty(HOST_PROPERTY_KEY, "")); + info.getProperty(HOST_PROPERTY_KEY, "")); hostProp.required = false; hostProp.description = "Hostname of Hive Server"; DriverPropertyInfo portProp = new DriverPropertyInfo(PORT_PROPERTY_KEY, - info.getProperty(PORT_PROPERTY_KEY, "")); + info.getProperty(PORT_PROPERTY_KEY, "")); portProp.required = false; portProp.description = "Port number of Hive Server"; DriverPropertyInfo dbProp = new DriverPropertyInfo(DBNAME_PROPERTY_KEY, - info.getProperty(DBNAME_PROPERTY_KEY, "default")); + info.getProperty(DBNAME_PROPERTY_KEY, "default")); dbProp.required = false; dbProp.description = "Database name"; @@ -167,9 +165,9 @@ } /** - * Takes a url in the form of jdbc:hive://[hostname]:[port]/[db_name] and parses it. - * Everything after jdbc:hive// is optional. - * + * Takes a url in the form of jdbc:hive://[hostname]:[port]/[db_name] and + * parses it. Everything after jdbc:hive// is optional. + * * @param url * @param defaults * @return @@ -184,7 +182,9 @@ throw new SQLException("Invalid connection url: " + url); } - if (url.length() <= URL_PREFIX.length()) return urlProps; + if (url.length() <= URL_PREFIX.length()) { + return urlProps; + } // [hostname]:[port]/[db_name] String connectionInfo = url.substring(URL_PREFIX.length()); @@ -198,8 +198,7 @@ urlProps.put(HOST_PROPERTY_KEY, hostAndPort[0]); if (hostAndPort.length > 1) { urlProps.put(PORT_PROPERTY_KEY, hostAndPort[1]); - } - else { + } else { urlProps.put(PORT_PROPERTY_KEY, DEFAULT_PORT); } } Index: jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveResultSetMetaData.java =================================================================== --- jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveResultSetMetaData.java (revision 901519) +++ jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveResultSetMetaData.java (working copy) @@ -18,23 +18,26 @@ package org.apache.hadoop.hive.jdbc; -import org.apache.hadoop.hive.serde.Constants; - +import java.sql.ResultSetMetaData; import java.sql.SQLException; -import java.sql.ResultSetMetaData; import java.sql.Types; import java.util.List; +import org.apache.hadoop.hive.serde.Constants; + public class HiveResultSetMetaData implements java.sql.ResultSetMetaData { List columnNames; List columnTypes; - public HiveResultSetMetaData(List columnNames, List columnTypes) { + public HiveResultSetMetaData(List columnNames, + List columnTypes) { this.columnNames = columnNames; this.columnTypes = columnTypes; } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSetMetaData#getCatalogName(int) */ @@ -43,7 +46,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSetMetaData#getColumnClassName(int) */ @@ -52,7 +57,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSetMetaData#getColumnCount() */ @@ -60,130 +67,157 @@ return columnNames.size(); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSetMetaData#getColumnDisplaySize(int) */ public int getColumnDisplaySize(int column) throws SQLException { // taking a stab at appropriate values - switch(getColumnType(column)) { - case Types.VARCHAR: - case Types.BIGINT: - return 32; - case Types.TINYINT: - return 2; - case Types.BOOLEAN: - return 8; - case Types.DOUBLE: - case Types.INTEGER: - return 16; - default: - return 32; + switch (getColumnType(column)) { + case Types.VARCHAR: + case Types.BIGINT: + return 32; + case Types.TINYINT: + return 2; + case Types.BOOLEAN: + return 8; + case Types.DOUBLE: + case Types.INTEGER: + return 16; + default: + return 32; } } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSetMetaData#getColumnLabel(int) */ public String getColumnLabel(int column) throws SQLException { // TODO Auto-generated method stub - return columnNames.get(column-1); + return columnNames.get(column - 1); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSetMetaData#getColumnName(int) */ public String getColumnName(int column) throws SQLException { - return columnNames.get(column-1); + return columnNames.get(column - 1); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSetMetaData#getColumnType(int) */ public int getColumnType(int column) throws SQLException { - if (columnTypes == null) - throw new SQLException("Could not determine column type name for ResultSet"); + if (columnTypes == null) { + throw new SQLException( + "Could not determine column type name for ResultSet"); + } - if (column < 1 || column > columnTypes.size()) + if (column < 1 || column > columnTypes.size()) { throw new SQLException("Invalid column value: " + column); + } // we need to convert the thrift type to the SQL type - String type = columnTypes.get(column-1); + String type = columnTypes.get(column - 1); // we need to convert the thrift type to the SQL type - //TODO: this would be better handled in an enum - if ("string".equals(type)) + // TODO: this would be better handled in an enum + if ("string".equals(type)) { return Types.VARCHAR; - else if ("bool".equals(type)) + } else if ("bool".equals(type)) { return Types.BOOLEAN; - else if ("double".equals(type)) + } else if ("double".equals(type)) { return Types.DOUBLE; - else if ("byte".equals(type)) + } else if ("byte".equals(type)) { return Types.TINYINT; - else if ("i32".equals(type)) + } else if ("i32".equals(type)) { return Types.INTEGER; - else if ("i64".equals(type)) + } else if ("i64".equals(type)) { return Types.BIGINT; + } throw new SQLException("Inrecognized column type: " + type); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSetMetaData#getColumnTypeName(int) */ public String getColumnTypeName(int column) throws SQLException { - if (columnTypes == null) - throw new SQLException("Could not determine column type name for ResultSet"); + if (columnTypes == null) { + throw new SQLException( + "Could not determine column type name for ResultSet"); + } - if (column < 1 || column > columnTypes.size()) + if (column < 1 || column > columnTypes.size()) { throw new SQLException("Invalid column value: " + column); + } // we need to convert the thrift type to the SQL type name - //TODO: this would be better handled in an enum - String type = columnTypes.get(column-1); - if ("string".equals(type)) + // TODO: this would be better handled in an enum + String type = columnTypes.get(column - 1); + if ("string".equals(type)) { return Constants.STRING_TYPE_NAME; - else if ("double".equals(type)) + } else if ("double".equals(type)) { return Constants.DOUBLE_TYPE_NAME; - - else if ("bool".equals(type)) + } else if ("bool".equals(type)) { return Constants.BOOLEAN_TYPE_NAME; - else if ("byte".equals(type)) + } else if ("byte".equals(type)) { return Constants.TINYINT_TYPE_NAME; - else if ("i32".equals(type)) + } else if ("i32".equals(type)) { return Constants.INT_TYPE_NAME; - else if ("i64".equals(type)) + } else if ("i64".equals(type)) { return Constants.BIGINT_TYPE_NAME; + } throw new SQLException("Inrecognized column type: " + type); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSetMetaData#getPrecision(int) */ public int getPrecision(int column) throws SQLException { - if (Types.DOUBLE == getColumnType(column)) return -1; //Do we have a precision limit? + if (Types.DOUBLE == getColumnType(column)) { + return -1; // Do we have a precision limit? + } return 0; } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSetMetaData#getScale(int) */ public int getScale(int column) throws SQLException { - if (Types.DOUBLE == getColumnType(column)) return -1; //Do we have a scale limit? + if (Types.DOUBLE == getColumnType(column)) { + return -1; // Do we have a scale limit? + } return 0; } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSetMetaData#getSchemaName(int) */ @@ -192,7 +226,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSetMetaData#getTableName(int) */ @@ -201,7 +237,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSetMetaData#isAutoIncrement(int) */ @@ -210,7 +248,9 @@ return false; } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSetMetaData#isCaseSensitive(int) */ @@ -219,7 +259,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSetMetaData#isCurrency(int) */ @@ -228,7 +270,9 @@ return false; } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSetMetaData#isDefinitelyWritable(int) */ @@ -237,7 +281,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSetMetaData#isNullable(int) */ @@ -246,7 +292,9 @@ return ResultSetMetaData.columnNullable; } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSetMetaData#isReadOnly(int) */ @@ -255,7 +303,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSetMetaData#isSearchable(int) */ @@ -264,7 +314,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSetMetaData#isSigned(int) */ @@ -273,7 +325,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.ResultSetMetaData#isWritable(int) */ @@ -282,7 +336,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Wrapper#isWrapperFor(java.lang.Class) */ @@ -291,7 +347,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Wrapper#unwrap(java.lang.Class) */ Index: jdbc/src/java/org/apache/hadoop/hive/jdbc/JdbcSessionState.java =================================================================== --- jdbc/src/java/org/apache/hadoop/hive/jdbc/JdbcSessionState.java (revision 901519) +++ jdbc/src/java/org/apache/hadoop/hive/jdbc/JdbcSessionState.java (working copy) @@ -18,8 +18,8 @@ package org.apache.hadoop.hive.jdbc; +import org.apache.hadoop.hive.conf.HiveConf; import org.apache.hadoop.hive.ql.session.SessionState; -import org.apache.hadoop.hive.conf.HiveConf; public class JdbcSessionState extends SessionState { @@ -27,7 +27,7 @@ super(); } - public JdbcSessionState (HiveConf conf) { + public JdbcSessionState(HiveConf conf) { super(conf); } } Index: jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveConnection.java =================================================================== --- jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveConnection.java (revision 901519) +++ jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveConnection.java (working copy) @@ -32,19 +32,20 @@ import java.sql.Savepoint; import java.sql.Statement; import java.sql.Struct; -import java.util.*; +import java.util.Map; +import java.util.Properties; + import org.apache.hadoop.hive.conf.HiveConf; +import org.apache.hadoop.hive.metastore.api.MetaException; import org.apache.hadoop.hive.ql.session.SessionState; - import org.apache.hadoop.hive.service.HiveClient; +import org.apache.hadoop.hive.service.HiveInterface; import org.apache.hadoop.hive.service.HiveServer; -import org.apache.hadoop.hive.service.HiveInterface; +import org.apache.thrift.protocol.TBinaryProtocol; import org.apache.thrift.protocol.TProtocol; -import org.apache.thrift.protocol.TBinaryProtocol; import org.apache.thrift.transport.TSocket; import org.apache.thrift.transport.TTransport; import org.apache.thrift.transport.TTransportException; -import org.apache.hadoop.hive.metastore.api.MetaException; public class HiveConnection implements java.sql.Connection { JdbcSessionState session; @@ -55,6 +56,7 @@ SQLWarning warningChain = null; private static final String URI_PREFIX = "jdbc:hive://"; + /** * TODO: - parse uri (use java.net.URI?) */ @@ -77,61 +79,63 @@ if (uri.isEmpty()) { try { client = new HiveServer.HiveServerHandler(); + } catch (MetaException e) { + throw new SQLException("Error accessing Hive metastore: " + + e.getMessage(), "08S01"); } - catch (MetaException e) { - throw new SQLException("Error accessing Hive metastore: " + - e.getMessage(), "08S01"); - } } else { // parse uri // form: hostname:port/databasename String[] parts = uri.split("/"); String[] hostport = parts[0].split(":"); - String databasename = "default"; int port = 10000; String host = hostport[0]; try { - databasename = parts[1]; port = Integer.parseInt(hostport[1]); + } catch (Exception e) { } - catch (Exception e) { - } transport = new TSocket(host, port); TProtocol protocol = new TBinaryProtocol(transport); client = new HiveClient(protocol); try { transport.open(); + } catch (TTransportException e) { + throw new SQLException("Could not establish connecton to " + + originalUri + ": " + e.getMessage(), "08S01"); } - catch (TTransportException e) { - throw new SQLException("Could not establish connecton to " + - originalUri + ": " + e.getMessage(), "08S01"); - } } isClosed = false; } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Connection#clearWarnings() */ public void clearWarnings() throws SQLException { - this.warningChain = null; + warningChain = null; } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Connection#close() */ public void close() throws SQLException { try { - if (transport != null) transport.close(); - } - finally { + if (transport != null) { + transport.close(); + } + } finally { isClosed = true; } } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Connection#commit() */ @@ -140,8 +144,11 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) - * @see java.sql.Connection#createArrayOf(java.lang.String, java.lang.Object[]) + /* + * (non-Javadoc) + * + * @see java.sql.Connection#createArrayOf(java.lang.String, + * java.lang.Object[]) */ public Array createArrayOf(String arg0, Object[] arg1) throws SQLException { @@ -149,7 +156,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Connection#createBlob() */ @@ -158,7 +167,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Connection#createClob() */ @@ -167,7 +178,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Connection#createNClob() */ @@ -176,7 +189,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Connection#createSQLXML() */ @@ -187,17 +202,22 @@ /** * Creates a Statement object for sending SQL statements to the database. - * - * @throws SQLException if a database access error occurs. + * + * @throws SQLException + * if a database access error occurs. * @see java.sql.Connection#createStatement() */ public Statement createStatement() throws SQLException { - if (isClosed) throw new SQLException("Can't create Statement, connection is closed"); + if (isClosed) { + throw new SQLException("Can't create Statement, connection is closed"); + } return new HiveStatement(session, client); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Connection#createStatement(int, int) */ @@ -207,18 +227,21 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Connection#createStatement(int, int, int) */ - public Statement createStatement(int resultSetType, - int resultSetConcurrency, int resultSetHoldability) - throws SQLException { + public Statement createStatement(int resultSetType, int resultSetConcurrency, + int resultSetHoldability) throws SQLException { // TODO Auto-generated method stub throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Connection#createStruct(java.lang.String, java.lang.Object[]) */ @@ -228,7 +251,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Connection#getAutoCommit() */ @@ -236,7 +261,9 @@ return true; } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Connection#getCatalog() */ @@ -245,7 +272,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Connection#getClientInfo() */ @@ -254,7 +283,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Connection#getClientInfo(java.lang.String) */ @@ -263,7 +294,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Connection#getHoldability() */ @@ -272,7 +305,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Connection#getMetaData() */ @@ -280,7 +315,9 @@ return new HiveDatabaseMetaData(); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Connection#getTransactionIsolation() */ @@ -289,7 +326,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Connection#getTypeMap() */ @@ -298,15 +337,19 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Connection#getWarnings() */ public SQLWarning getWarnings() throws SQLException { - return this.warningChain; + return warningChain; } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Connection#isClosed() */ @@ -314,7 +357,9 @@ return isClosed; } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Connection#isReadOnly() */ @@ -323,7 +368,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Connection#isValid(int) */ @@ -332,7 +379,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Connection#nativeSQL(java.lang.String) */ @@ -341,7 +390,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Connection#prepareCall(java.lang.String) */ @@ -350,7 +401,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Connection#prepareCall(java.lang.String, int, int) */ @@ -360,18 +413,21 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Connection#prepareCall(java.lang.String, int, int, int) */ public CallableStatement prepareCall(String sql, int resultSetType, - int resultSetConcurrency, int resultSetHoldability) - throws SQLException { + int resultSetConcurrency, int resultSetHoldability) throws SQLException { // TODO Auto-generated method stub throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Connection#prepareStatement(java.lang.String) */ @@ -379,7 +435,9 @@ return new HivePreparedStatement(session, client, sql); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Connection#prepareStatement(java.lang.String, int) */ @@ -388,7 +446,9 @@ return new HivePreparedStatement(session, client, sql); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Connection#prepareStatement(java.lang.String, int[]) */ @@ -398,8 +458,11 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) - * @see java.sql.Connection#prepareStatement(java.lang.String, java.lang.String[]) + /* + * (non-Javadoc) + * + * @see java.sql.Connection#prepareStatement(java.lang.String, + * java.lang.String[]) */ public PreparedStatement prepareStatement(String sql, String[] columnNames) @@ -408,7 +471,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Connection#prepareStatement(java.lang.String, int, int) */ @@ -417,18 +482,21 @@ return new HivePreparedStatement(session, client, sql); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Connection#prepareStatement(java.lang.String, int, int, int) */ public PreparedStatement prepareStatement(String sql, int resultSetType, - int resultSetConcurrency, int resultSetHoldability) - throws SQLException { + int resultSetConcurrency, int resultSetHoldability) throws SQLException { // TODO Auto-generated method stub throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Connection#releaseSavepoint(java.sql.Savepoint) */ @@ -437,7 +505,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Connection#rollback() */ @@ -446,7 +516,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Connection#rollback(java.sql.Savepoint) */ @@ -455,7 +527,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Connection#setAutoCommit(boolean) */ @@ -464,7 +538,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Connection#setCatalog(java.lang.String) */ @@ -473,7 +549,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Connection#setClientInfo(java.util.Properties) */ @@ -483,7 +561,9 @@ throw new SQLClientInfoException("Method not supported", null); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Connection#setClientInfo(java.lang.String, java.lang.String) */ @@ -493,7 +573,9 @@ throw new SQLClientInfoException("Method not supported", null); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Connection#setHoldability(int) */ @@ -502,7 +584,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Connection#setReadOnly(boolean) */ @@ -511,7 +595,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Connection#setSavepoint() */ @@ -520,7 +606,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Connection#setSavepoint(java.lang.String) */ @@ -529,7 +617,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Connection#setTransactionIsolation(int) */ @@ -538,7 +628,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Connection#setTypeMap(java.util.Map) */ @@ -547,7 +639,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Wrapper#isWrapperFor(java.lang.Class) */ @@ -556,7 +650,9 @@ throw new SQLException("Method not supported"); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.sql.Wrapper#unwrap(java.lang.Class) */