Matt Burgess created NIFI-8046: ---------------------------------- Summary: ResultSetRecordSet throws exception on DB2 Key: NIFI-8046 URL: https://issues.apache.org/jira/browse/NIFI-8046 Project: Apache NiFi Issue Type: Improvement Components: Extensions Reporter: Matt Burgess
Consumers of ResultSetRecordSet (such as QueryDatabaseTableRecord) can end up with an exception being thrown when processing the results. This is due to DB2 behavior that closes a ResultSet when the last row has been read, meaning next() can return true then isClosed() can return true. This was handled in general for the QueryDatabaseTable processors via NIFI-5303 (even though only QDT itself existed at the time, not QueryDatabaseTableRecord). However QueryDatabaseTableRecord uses ResultSetRecordSet, which calls ResultSet.next() before creating a schema from the ResultSet. On DB2 (if the result set is empty, e.g.) this results in an exception being thrown when ResultSet.getMetaData() is called from createSchema(). -- This message was sent by Atlassian Jira (v8.3.4#803005)