mattyb149 commented on a change in pull request #4539:
URL: https://github.com/apache/nifi/pull/4539#discussion_r492194436
##########
File path:
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/GenerateTableFetch.java
##########
@@ -511,7 +511,7 @@ public void onTrigger(final ProcessContext context, final
ProcessSessionFactory
whereClause = maxValueClauses.isEmpty() ? "1=1" :
StringUtils.join(maxValueClauses, " AND ");
Long offset = partitionSize == 0 ? null : i *
partitionSize + (useColumnValsForPaging ? minValueForPartitioning : 0);
// Don't use an ORDER BY clause if there's only one
partition
- final String orderByClause = partitionSize == 0 ? null
: (maxColumnNames.isEmpty() ? customOrderByColumn : maxColumnNames);
+ final String orderByClause = partitionSize == 0 ? null
: (StringUtils.isNotEmpty(customOrderByColumn) ? customOrderByColumn :
maxColumnNames);
Review comment:
This changes the documented behavior slightly, the `Custom ORDER BY
Column` description says it will be ignored if `Max Value Column Names` is set.
This is no longer true, it is only ignored now if partition size is zero. Can
you update the documentation for the `Custom ORDER BY Column` property to
reflect this behavior?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]