[jira] [Updated] (HIVE-8330) HiveResultSet.findColumn() parameters are case sensitive
[ https://issues.apache.org/jira/browse/HIVE-8330?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Brock Noland updated HIVE-8330: --- Resolution: Fixed Fix Version/s: 0.15.0 Status: Resolved (was: Patch Available) Thank you very much Sergio! I have committed your contribution to trunk! HiveResultSet.findColumn() parameters are case sensitive Key: HIVE-8330 URL: https://issues.apache.org/jira/browse/HIVE-8330 Project: Hive Issue Type: Bug Affects Versions: 0.13.1 Reporter: Sergio Peña Assignee: Sergio Peña Fix For: 0.15.0 Attachments: HIVE-8330.1.patch, HIVE-8330.2.patch, HIVE-8330.3.patch, HIVE-8330.4.patch Look at the following code: {noformat} Class.forName(org.apache.hive.jdbc.HiveDriver); Connection db = null; Statement stmt = null; ResultSet rs = null; try { db = DriverManager.getConnection(jdbc:hive2://localhost:1/default, hive, ); stmt = db.createStatement(); rs = stmt.executeQuery(SELECT * FROM sample_07 limit 1); ResultSetMetaData metaData = rs.getMetaData(); for (int i = 1; i = metaData.getColumnCount(); i++) { System.out.println(Column + i + : + metaData.getColumnName(i)); } while (rs.next()) { System.out.println(rs.findColumn(code)); } } finally { DbUtils.closeQuietly(db, stmt, rs); } {noformat} Above program will generate following result on my cluster: {noformat} Column 1: code Column 2: description Column 3: total_emp Column 4: salary 1 {noformat} However, if the last print sentence is changed as following (using uppercase characters): {noformat} System.out.println(rs.findColumn(Code)); {noformat} The program will fail at exactly that line. The same happens if the column name is changed as CODE Based on the JDBC ResultSet documentation, this method should be case insensitive. Column names used as input to getter methods are case insensitive http://docs.oracle.com/javase/7/docs/api/java/sql/ResultSet.html -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (HIVE-8330) HiveResultSet.findColumn() parameters are case sensitive
[ https://issues.apache.org/jira/browse/HIVE-8330?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Brock Noland updated HIVE-8330: --- Release Note: HiveResultSet.findColumn() was case sensitive which is non-standard. This has been fixed. HiveResultSet.findColumn() parameters are case sensitive Key: HIVE-8330 URL: https://issues.apache.org/jira/browse/HIVE-8330 Project: Hive Issue Type: Bug Affects Versions: 0.13.1 Reporter: Sergio Peña Assignee: Sergio Peña Fix For: 0.15.0 Attachments: HIVE-8330.1.patch, HIVE-8330.2.patch, HIVE-8330.3.patch, HIVE-8330.4.patch Look at the following code: {noformat} Class.forName(org.apache.hive.jdbc.HiveDriver); Connection db = null; Statement stmt = null; ResultSet rs = null; try { db = DriverManager.getConnection(jdbc:hive2://localhost:1/default, hive, ); stmt = db.createStatement(); rs = stmt.executeQuery(SELECT * FROM sample_07 limit 1); ResultSetMetaData metaData = rs.getMetaData(); for (int i = 1; i = metaData.getColumnCount(); i++) { System.out.println(Column + i + : + metaData.getColumnName(i)); } while (rs.next()) { System.out.println(rs.findColumn(code)); } } finally { DbUtils.closeQuietly(db, stmt, rs); } {noformat} Above program will generate following result on my cluster: {noformat} Column 1: code Column 2: description Column 3: total_emp Column 4: salary 1 {noformat} However, if the last print sentence is changed as following (using uppercase characters): {noformat} System.out.println(rs.findColumn(Code)); {noformat} The program will fail at exactly that line. The same happens if the column name is changed as CODE Based on the JDBC ResultSet documentation, this method should be case insensitive. Column names used as input to getter methods are case insensitive http://docs.oracle.com/javase/7/docs/api/java/sql/ResultSet.html -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (HIVE-8330) HiveResultSet.findColumn() parameters are case sensitive
[ https://issues.apache.org/jira/browse/HIVE-8330?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sergio Peña updated HIVE-8330: -- Attachment: HIVE-8330.3.patch Attach new patch with small changes on TestJdbcDriver2.java HiveResultSet.findColumn() parameters are case sensitive Key: HIVE-8330 URL: https://issues.apache.org/jira/browse/HIVE-8330 Project: Hive Issue Type: Bug Affects Versions: 0.13.1 Reporter: Sergio Peña Assignee: Sergio Peña Attachments: HIVE-8330.1.patch, HIVE-8330.2.patch, HIVE-8330.3.patch Look at the following code: {noformat} Class.forName(org.apache.hive.jdbc.HiveDriver); Connection db = null; Statement stmt = null; ResultSet rs = null; try { db = DriverManager.getConnection(jdbc:hive2://localhost:1/default, hive, ); stmt = db.createStatement(); rs = stmt.executeQuery(SELECT * FROM sample_07 limit 1); ResultSetMetaData metaData = rs.getMetaData(); for (int i = 1; i = metaData.getColumnCount(); i++) { System.out.println(Column + i + : + metaData.getColumnName(i)); } while (rs.next()) { System.out.println(rs.findColumn(code)); } } finally { DbUtils.closeQuietly(db, stmt, rs); } {noformat} Above program will generate following result on my cluster: {noformat} Column 1: code Column 2: description Column 3: total_emp Column 4: salary 1 {noformat} However, if the last print sentence is changed as following (using uppercase characters): {noformat} System.out.println(rs.findColumn(Code)); {noformat} The program will fail at exactly that line. The same happens if the column name is changed as CODE Based on the JDBC ResultSet documentation, this method should be case insensitive. Column names used as input to getter methods are case insensitive http://docs.oracle.com/javase/7/docs/api/java/sql/ResultSet.html -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (HIVE-8330) HiveResultSet.findColumn() parameters are case sensitive
[ https://issues.apache.org/jira/browse/HIVE-8330?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sergio Peña updated HIVE-8330: -- Status: Patch Available (was: Open) HiveResultSet.findColumn() parameters are case sensitive Key: HIVE-8330 URL: https://issues.apache.org/jira/browse/HIVE-8330 Project: Hive Issue Type: Bug Affects Versions: 0.13.1 Reporter: Sergio Peña Assignee: Sergio Peña Attachments: HIVE-8330.1.patch, HIVE-8330.2.patch, HIVE-8330.3.patch Look at the following code: {noformat} Class.forName(org.apache.hive.jdbc.HiveDriver); Connection db = null; Statement stmt = null; ResultSet rs = null; try { db = DriverManager.getConnection(jdbc:hive2://localhost:1/default, hive, ); stmt = db.createStatement(); rs = stmt.executeQuery(SELECT * FROM sample_07 limit 1); ResultSetMetaData metaData = rs.getMetaData(); for (int i = 1; i = metaData.getColumnCount(); i++) { System.out.println(Column + i + : + metaData.getColumnName(i)); } while (rs.next()) { System.out.println(rs.findColumn(code)); } } finally { DbUtils.closeQuietly(db, stmt, rs); } {noformat} Above program will generate following result on my cluster: {noformat} Column 1: code Column 2: description Column 3: total_emp Column 4: salary 1 {noformat} However, if the last print sentence is changed as following (using uppercase characters): {noformat} System.out.println(rs.findColumn(Code)); {noformat} The program will fail at exactly that line. The same happens if the column name is changed as CODE Based on the JDBC ResultSet documentation, this method should be case insensitive. Column names used as input to getter methods are case insensitive http://docs.oracle.com/javase/7/docs/api/java/sql/ResultSet.html -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (HIVE-8330) HiveResultSet.findColumn() parameters are case sensitive
[ https://issues.apache.org/jira/browse/HIVE-8330?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sergio Peña updated HIVE-8330: -- Status: Open (was: Patch Available) HiveResultSet.findColumn() parameters are case sensitive Key: HIVE-8330 URL: https://issues.apache.org/jira/browse/HIVE-8330 Project: Hive Issue Type: Bug Affects Versions: 0.13.1 Reporter: Sergio Peña Assignee: Sergio Peña Attachments: HIVE-8330.1.patch, HIVE-8330.2.patch, HIVE-8330.3.patch Look at the following code: {noformat} Class.forName(org.apache.hive.jdbc.HiveDriver); Connection db = null; Statement stmt = null; ResultSet rs = null; try { db = DriverManager.getConnection(jdbc:hive2://localhost:1/default, hive, ); stmt = db.createStatement(); rs = stmt.executeQuery(SELECT * FROM sample_07 limit 1); ResultSetMetaData metaData = rs.getMetaData(); for (int i = 1; i = metaData.getColumnCount(); i++) { System.out.println(Column + i + : + metaData.getColumnName(i)); } while (rs.next()) { System.out.println(rs.findColumn(code)); } } finally { DbUtils.closeQuietly(db, stmt, rs); } {noformat} Above program will generate following result on my cluster: {noformat} Column 1: code Column 2: description Column 3: total_emp Column 4: salary 1 {noformat} However, if the last print sentence is changed as following (using uppercase characters): {noformat} System.out.println(rs.findColumn(Code)); {noformat} The program will fail at exactly that line. The same happens if the column name is changed as CODE Based on the JDBC ResultSet documentation, this method should be case insensitive. Column names used as input to getter methods are case insensitive http://docs.oracle.com/javase/7/docs/api/java/sql/ResultSet.html -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (HIVE-8330) HiveResultSet.findColumn() parameters are case sensitive
[ https://issues.apache.org/jira/browse/HIVE-8330?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sergio Peña updated HIVE-8330: -- Status: Open (was: Patch Available) HiveResultSet.findColumn() parameters are case sensitive Key: HIVE-8330 URL: https://issues.apache.org/jira/browse/HIVE-8330 Project: Hive Issue Type: Bug Affects Versions: 0.13.1 Reporter: Sergio Peña Assignee: Sergio Peña Attachments: HIVE-8330.1.patch, HIVE-8330.2.patch, HIVE-8330.3.patch Look at the following code: {noformat} Class.forName(org.apache.hive.jdbc.HiveDriver); Connection db = null; Statement stmt = null; ResultSet rs = null; try { db = DriverManager.getConnection(jdbc:hive2://localhost:1/default, hive, ); stmt = db.createStatement(); rs = stmt.executeQuery(SELECT * FROM sample_07 limit 1); ResultSetMetaData metaData = rs.getMetaData(); for (int i = 1; i = metaData.getColumnCount(); i++) { System.out.println(Column + i + : + metaData.getColumnName(i)); } while (rs.next()) { System.out.println(rs.findColumn(code)); } } finally { DbUtils.closeQuietly(db, stmt, rs); } {noformat} Above program will generate following result on my cluster: {noformat} Column 1: code Column 2: description Column 3: total_emp Column 4: salary 1 {noformat} However, if the last print sentence is changed as following (using uppercase characters): {noformat} System.out.println(rs.findColumn(Code)); {noformat} The program will fail at exactly that line. The same happens if the column name is changed as CODE Based on the JDBC ResultSet documentation, this method should be case insensitive. Column names used as input to getter methods are case insensitive http://docs.oracle.com/javase/7/docs/api/java/sql/ResultSet.html -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (HIVE-8330) HiveResultSet.findColumn() parameters are case sensitive
[ https://issues.apache.org/jira/browse/HIVE-8330?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sergio Peña updated HIVE-8330: -- Attachment: HIVE-8330.4.patch HiveResultSet.findColumn() parameters are case sensitive Key: HIVE-8330 URL: https://issues.apache.org/jira/browse/HIVE-8330 Project: Hive Issue Type: Bug Affects Versions: 0.13.1 Reporter: Sergio Peña Assignee: Sergio Peña Attachments: HIVE-8330.1.patch, HIVE-8330.2.patch, HIVE-8330.3.patch, HIVE-8330.4.patch Look at the following code: {noformat} Class.forName(org.apache.hive.jdbc.HiveDriver); Connection db = null; Statement stmt = null; ResultSet rs = null; try { db = DriverManager.getConnection(jdbc:hive2://localhost:1/default, hive, ); stmt = db.createStatement(); rs = stmt.executeQuery(SELECT * FROM sample_07 limit 1); ResultSetMetaData metaData = rs.getMetaData(); for (int i = 1; i = metaData.getColumnCount(); i++) { System.out.println(Column + i + : + metaData.getColumnName(i)); } while (rs.next()) { System.out.println(rs.findColumn(code)); } } finally { DbUtils.closeQuietly(db, stmt, rs); } {noformat} Above program will generate following result on my cluster: {noformat} Column 1: code Column 2: description Column 3: total_emp Column 4: salary 1 {noformat} However, if the last print sentence is changed as following (using uppercase characters): {noformat} System.out.println(rs.findColumn(Code)); {noformat} The program will fail at exactly that line. The same happens if the column name is changed as CODE Based on the JDBC ResultSet documentation, this method should be case insensitive. Column names used as input to getter methods are case insensitive http://docs.oracle.com/javase/7/docs/api/java/sql/ResultSet.html -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (HIVE-8330) HiveResultSet.findColumn() parameters are case sensitive
[ https://issues.apache.org/jira/browse/HIVE-8330?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sergio Peña updated HIVE-8330: -- Status: Patch Available (was: Open) HiveResultSet.findColumn() parameters are case sensitive Key: HIVE-8330 URL: https://issues.apache.org/jira/browse/HIVE-8330 Project: Hive Issue Type: Bug Affects Versions: 0.13.1 Reporter: Sergio Peña Assignee: Sergio Peña Attachments: HIVE-8330.1.patch, HIVE-8330.2.patch, HIVE-8330.3.patch, HIVE-8330.4.patch Look at the following code: {noformat} Class.forName(org.apache.hive.jdbc.HiveDriver); Connection db = null; Statement stmt = null; ResultSet rs = null; try { db = DriverManager.getConnection(jdbc:hive2://localhost:1/default, hive, ); stmt = db.createStatement(); rs = stmt.executeQuery(SELECT * FROM sample_07 limit 1); ResultSetMetaData metaData = rs.getMetaData(); for (int i = 1; i = metaData.getColumnCount(); i++) { System.out.println(Column + i + : + metaData.getColumnName(i)); } while (rs.next()) { System.out.println(rs.findColumn(code)); } } finally { DbUtils.closeQuietly(db, stmt, rs); } {noformat} Above program will generate following result on my cluster: {noformat} Column 1: code Column 2: description Column 3: total_emp Column 4: salary 1 {noformat} However, if the last print sentence is changed as following (using uppercase characters): {noformat} System.out.println(rs.findColumn(Code)); {noformat} The program will fail at exactly that line. The same happens if the column name is changed as CODE Based on the JDBC ResultSet documentation, this method should be case insensitive. Column names used as input to getter methods are case insensitive http://docs.oracle.com/javase/7/docs/api/java/sql/ResultSet.html -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (HIVE-8330) HiveResultSet.findColumn() parameters are case sensitive
[ https://issues.apache.org/jira/browse/HIVE-8330?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sergio Peña updated HIVE-8330: -- Attachment: HIVE-8330.1.patch Convert the columnName parameter to lower case fixes the bug. HiveResultSet.findColumn() parameters are case sensitive Key: HIVE-8330 URL: https://issues.apache.org/jira/browse/HIVE-8330 Project: Hive Issue Type: Bug Affects Versions: 0.13.1 Reporter: Sergio Peña Assignee: Sergio Peña Attachments: HIVE-8330.1.patch Look at the following code: {noformat} Class.forName(org.apache.hive.jdbc.HiveDriver); Connection db = null; Statement stmt = null; ResultSet rs = null; try { db = DriverManager.getConnection(jdbc:hive2://localhost:1/default, hive, ); stmt = db.createStatement(); rs = stmt.executeQuery(SELECT * FROM sample_07 limit 1); ResultSetMetaData metaData = rs.getMetaData(); for (int i = 1; i = metaData.getColumnCount(); i++) { System.out.println(Column + i + : + metaData.getColumnName(i)); } while (rs.next()) { System.out.println(rs.findColumn(code)); } } finally { DbUtils.closeQuietly(db, stmt, rs); } {noformat} Above program will generate following result on my cluster: {noformat} Column 1: code Column 2: description Column 3: total_emp Column 4: salary 1 {noformat} However, if the last print sentence is changed as following (using uppercase characters): {noformat} System.out.println(rs.findColumn(Code)); {noformat} The program will fail at exactly that line. The same happens if the column name is changed as CODE Based on the JDBC ResultSet documentation, this method should be case insensitive. Column names used as input to getter methods are case insensitive http://docs.oracle.com/javase/7/docs/api/java/sql/ResultSet.html -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (HIVE-8330) HiveResultSet.findColumn() parameters are case sensitive
[ https://issues.apache.org/jira/browse/HIVE-8330?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sergio Peña updated HIVE-8330: -- Status: Patch Available (was: In Progress) HiveResultSet.findColumn() parameters are case sensitive Key: HIVE-8330 URL: https://issues.apache.org/jira/browse/HIVE-8330 Project: Hive Issue Type: Bug Affects Versions: 0.13.1 Reporter: Sergio Peña Assignee: Sergio Peña Attachments: HIVE-8330.1.patch Look at the following code: {noformat} Class.forName(org.apache.hive.jdbc.HiveDriver); Connection db = null; Statement stmt = null; ResultSet rs = null; try { db = DriverManager.getConnection(jdbc:hive2://localhost:1/default, hive, ); stmt = db.createStatement(); rs = stmt.executeQuery(SELECT * FROM sample_07 limit 1); ResultSetMetaData metaData = rs.getMetaData(); for (int i = 1; i = metaData.getColumnCount(); i++) { System.out.println(Column + i + : + metaData.getColumnName(i)); } while (rs.next()) { System.out.println(rs.findColumn(code)); } } finally { DbUtils.closeQuietly(db, stmt, rs); } {noformat} Above program will generate following result on my cluster: {noformat} Column 1: code Column 2: description Column 3: total_emp Column 4: salary 1 {noformat} However, if the last print sentence is changed as following (using uppercase characters): {noformat} System.out.println(rs.findColumn(Code)); {noformat} The program will fail at exactly that line. The same happens if the column name is changed as CODE Based on the JDBC ResultSet documentation, this method should be case insensitive. Column names used as input to getter methods are case insensitive http://docs.oracle.com/javase/7/docs/api/java/sql/ResultSet.html -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (HIVE-8330) HiveResultSet.findColumn() parameters are case sensitive
[ https://issues.apache.org/jira/browse/HIVE-8330?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sergio Peña updated HIVE-8330: -- Status: Open (was: Patch Available) HiveResultSet.findColumn() parameters are case sensitive Key: HIVE-8330 URL: https://issues.apache.org/jira/browse/HIVE-8330 Project: Hive Issue Type: Bug Affects Versions: 0.13.1 Reporter: Sergio Peña Assignee: Sergio Peña Attachments: HIVE-8330.1.patch Look at the following code: {noformat} Class.forName(org.apache.hive.jdbc.HiveDriver); Connection db = null; Statement stmt = null; ResultSet rs = null; try { db = DriverManager.getConnection(jdbc:hive2://localhost:1/default, hive, ); stmt = db.createStatement(); rs = stmt.executeQuery(SELECT * FROM sample_07 limit 1); ResultSetMetaData metaData = rs.getMetaData(); for (int i = 1; i = metaData.getColumnCount(); i++) { System.out.println(Column + i + : + metaData.getColumnName(i)); } while (rs.next()) { System.out.println(rs.findColumn(code)); } } finally { DbUtils.closeQuietly(db, stmt, rs); } {noformat} Above program will generate following result on my cluster: {noformat} Column 1: code Column 2: description Column 3: total_emp Column 4: salary 1 {noformat} However, if the last print sentence is changed as following (using uppercase characters): {noformat} System.out.println(rs.findColumn(Code)); {noformat} The program will fail at exactly that line. The same happens if the column name is changed as CODE Based on the JDBC ResultSet documentation, this method should be case insensitive. Column names used as input to getter methods are case insensitive http://docs.oracle.com/javase/7/docs/api/java/sql/ResultSet.html -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (HIVE-8330) HiveResultSet.findColumn() parameters are case sensitive
[ https://issues.apache.org/jira/browse/HIVE-8330?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sergio Peña updated HIVE-8330: -- Attachment: HIVE-8330.2.patch HiveResultSet.findColumn() parameters are case sensitive Key: HIVE-8330 URL: https://issues.apache.org/jira/browse/HIVE-8330 Project: Hive Issue Type: Bug Affects Versions: 0.13.1 Reporter: Sergio Peña Assignee: Sergio Peña Attachments: HIVE-8330.1.patch, HIVE-8330.2.patch Look at the following code: {noformat} Class.forName(org.apache.hive.jdbc.HiveDriver); Connection db = null; Statement stmt = null; ResultSet rs = null; try { db = DriverManager.getConnection(jdbc:hive2://localhost:1/default, hive, ); stmt = db.createStatement(); rs = stmt.executeQuery(SELECT * FROM sample_07 limit 1); ResultSetMetaData metaData = rs.getMetaData(); for (int i = 1; i = metaData.getColumnCount(); i++) { System.out.println(Column + i + : + metaData.getColumnName(i)); } while (rs.next()) { System.out.println(rs.findColumn(code)); } } finally { DbUtils.closeQuietly(db, stmt, rs); } {noformat} Above program will generate following result on my cluster: {noformat} Column 1: code Column 2: description Column 3: total_emp Column 4: salary 1 {noformat} However, if the last print sentence is changed as following (using uppercase characters): {noformat} System.out.println(rs.findColumn(Code)); {noformat} The program will fail at exactly that line. The same happens if the column name is changed as CODE Based on the JDBC ResultSet documentation, this method should be case insensitive. Column names used as input to getter methods are case insensitive http://docs.oracle.com/javase/7/docs/api/java/sql/ResultSet.html -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (HIVE-8330) HiveResultSet.findColumn() parameters are case sensitive
[ https://issues.apache.org/jira/browse/HIVE-8330?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sergio Peña updated HIVE-8330: -- Status: Patch Available (was: Open) HiveResultSet.findColumn() parameters are case sensitive Key: HIVE-8330 URL: https://issues.apache.org/jira/browse/HIVE-8330 Project: Hive Issue Type: Bug Affects Versions: 0.13.1 Reporter: Sergio Peña Assignee: Sergio Peña Attachments: HIVE-8330.1.patch, HIVE-8330.2.patch Look at the following code: {noformat} Class.forName(org.apache.hive.jdbc.HiveDriver); Connection db = null; Statement stmt = null; ResultSet rs = null; try { db = DriverManager.getConnection(jdbc:hive2://localhost:1/default, hive, ); stmt = db.createStatement(); rs = stmt.executeQuery(SELECT * FROM sample_07 limit 1); ResultSetMetaData metaData = rs.getMetaData(); for (int i = 1; i = metaData.getColumnCount(); i++) { System.out.println(Column + i + : + metaData.getColumnName(i)); } while (rs.next()) { System.out.println(rs.findColumn(code)); } } finally { DbUtils.closeQuietly(db, stmt, rs); } {noformat} Above program will generate following result on my cluster: {noformat} Column 1: code Column 2: description Column 3: total_emp Column 4: salary 1 {noformat} However, if the last print sentence is changed as following (using uppercase characters): {noformat} System.out.println(rs.findColumn(Code)); {noformat} The program will fail at exactly that line. The same happens if the column name is changed as CODE Based on the JDBC ResultSet documentation, this method should be case insensitive. Column names used as input to getter methods are case insensitive http://docs.oracle.com/javase/7/docs/api/java/sql/ResultSet.html -- This message was sent by Atlassian JIRA (v6.3.4#6332)