You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by GitBox <gi...@apache.org> on 2021/03/02 02:41:26 UTC

[GitHub] [nifi] mattyb149 commented on a change in pull request #4539: NIFI-7824:GenerateTableFetch Improvement

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:
users@infra.apache.org