mattyb149 commented on a change in pull request #4539:
URL: https://github.com/apache/nifi/pull/4539#discussion_r585205484
##########
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:
It's not guaranteed the user will see the Custom ORDER BY doc, if you
need to change the description slightly you can start with the existing
PropertyDescriptor in the Builder by using `.fromPropertyDescriptor()`, there
are some examples in the existing codebase
----------------------------------------------------------------
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]