Maksim Zhuravkov created IGNITE-25784:
-----------------------------------------

             Summary: CLI. Table fromResultSet returns null when encounters a 
jdbc exception
                 Key: IGNITE-25784
                 URL: https://issues.apache.org/jira/browse/IGNITE-25784
             Project: Ignite
          Issue Type: Bug
          Components: cli ai3
            Reporter: Maksim Zhuravkov


Table's fromResultSet returns null when encounters a jdbc exception, the 
exception should be returned to a caller instead:

{noformat}
try {
            ResultSetMetaData metaData = resultSet.getMetaData();
            int columnCount = metaData.getColumnCount();
            List<String> ids = new ArrayList<>();
            for (int i = 1; i <= columnCount; i++) {
                ids.add(metaData.getColumnName(i));
            }
            List<String> content = new ArrayList<>();
            while (resultSet.next()) {
                for (int i = 1; i <= columnCount; i++) {
                    content.add(resultSet.getString(i));
                }
            }
            return new Table<>(ids, content);
        } catch (SQLException e) {
            return null; // << here
        }
{noformat}




--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to