Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
The discovery of the bug in NIFI-1409 was a result of an exception being thrown when no columns were present in a result set returned by a query in the ExecuteSql processor. While NIFI-1409 is concerned with handling all such exceptions, this case is for the aforementioned exception.
The problem seems to be in JdbcCommon.createSchema():
https://github.com/apache/nifi/blob/nifi-0.4.1/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/util/JdbcCommon.java#L130
This line asks for the table name for the first column, and when there are no columns, a SQLException is thrown.
The Avro docs suggest that no fields are necessary for the schema to be valid, so if there are no columns in the result set, a schema with no fields should be returned, rather than an exception being thrown.
Attachments
Attachments
Issue Links
- is related to
-
NIFI-1409 ExecuteSQL gives transfer error when SQLException occurs with no input flowfile
- Resolved