Github user bdesert commented on a diff in the pull request:
https://github.com/apache/nifi/pull/2695#discussion_r190653106
--- Diff:
nifi-nar-bundles/nifi-hive-bundle/nifi-hive-processors/src/test/java/org/apache/nifi/processors/hive/TestSelectHiveQL.java
---
@@ -198,6 +200,51 @@ public void testWithSqlException() throws SQLException
{
runner.assertAllFlowFilesTransferred(SelectHiveQL.REL_FAILURE, 1);
}
+ @Test
+ public void invokeOnTriggerExceptionInPreQieriesNoIncomingFlows()
+ throws InitializationException, ClassNotFoundException,
SQLException, IOException {
+
+ doOnTrigger(QUERY_WITHOUT_EL, false, CSV,
+ "select 'no exception' from persons; select exception from
persons",
+ null);
+
+ runner.assertAllFlowFilesTransferred(SelectHiveQL.REL_FAILURE, 1);
--- End diff --
>In general the behavior should remain the same whenever possible
Currently, if there is an error in SQL Query - it will go to "failure"
relationship (even if there are no incoming connections)


So, I follow current error handling strategy. It's just wasn't accurate
about:
> since we weren't issuing a flow file on failure before
because we do issue FF on failure (on establishing connection it is
different though, and not impacted by this change).
@mattyb149 , Any word on this?
---