rdesantis / hauldata

Database Process Automation made easy.
Apache License 2.0
1 stars 0 forks source link

Support UPDATE task with Redshift JDBC driver #153

Open rdesantis opened 3 years ago

rdesantis commented 3 years ago

Using the UPDATE task with a Redshift connection currently results in an error message something like "Feature is not supported by the driver". The specific feature is most likely in this code in DataSource.java:

protected int getResultSetType() {
    return singleRow ? ResultSet.TYPE_SCROLL_INSENSITIVE : ResultSet.TYPE_FORWARD_ONLY;
}

This is an incorrect usage of TYPE_SCROLL_INSENSITIVE. The intention of the code is to indicate to the driver that the result set will not be scrolled at all, but that is not what TYPE_SCROLL_INSENSITIVE means; in fact there is no result set type to indicate a non-scrollable result set. Instead, getResultSetType() should always return TYPE_FORWARD_ONLY.