markap14 commented on code in PR #11766:
URL: https://github.com/apache/nifi/pull/11766#discussion_r4198305201


##########
nifi-extension-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestExecuteSQL.java:
##########
@@ -638,8 +640,25 @@ void testMigrateProperties() {
                 Map.entry(JdbcProperties.OLD_DEFAULT_SCALE_PROPERTY_NAME, 
DEFAULT_SCALE.getName())
         );
 
-        final PropertyMigrationResult propertyMigrationResult = 
runner.migrateProperties();
-        assertEquals(expectedRenamed, 
propertyMigrationResult.getPropertiesRenamed());
+        assertEquals("1000", AbstractExecuteSQL.FETCH_SIZE.getDefaultValue());

Review Comment:
   [GPT-5.6 Terra] @exceptionfactory Addressed in 75597d6641b. The test now 
references AbstractExecuteSQL.DEFAULT_FETCH_SIZE.



##########
nifi-extension-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/AbstractExecuteSQL.java:
##########
@@ -220,6 +221,11 @@ public void migrateProperties(final PropertyConfiguration 
config) {
         config.renameProperty("sql-post-query", SQL_POST_QUERY.getName());
         config.renameProperty("esql-output-batch-size", 
OUTPUT_BATCH_SIZE.getName());
         config.renameProperty("esql-fetch-size", FETCH_SIZE.getName());
+        final Optional<String> configuredFetchSize = 
config.getRawPropertyValue(FETCH_SIZE.getName());
+        if (configuredFetchSize.isPresent() && 
"0".equals(configuredFetchSize.get())) {
+            config.setProperty(FETCH_SIZE.getName(), "1000");

Review Comment:
   [GPT-5.6 Terra] @exceptionfactory Addressed in 75597d6641b. 
AbstractExecuteSQL now declares DEFAULT_FETCH_SIZE and reuses it for the 
property default, migration, and test assertions.



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to