Github user pvillard31 commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/2695#discussion_r190637825
  
    --- 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 --
    
    Based on the comment from @mattyb149 in the JIRA:
    > In general the behavior should remain the same whenever possible, so if 
you have a SelectHiveQL that doesn't have incoming (non-loop) connections, then 
the query must be supplied, and whether it (or the pre-post queries) have EL in 
them, then since we weren't issuing a flow file on failure before, we shouldn't 
now either. So when I said "Route to Failure with penalization for everything 
else", that's only when there is a flow file to route. If there isn't, then we 
should yield (and remove any created flow files and/or rollback our session 
anyway).
    
    Not sure to understand the assertion here since there is no incoming ff, 
right?


---

Reply via email to