NIFI-2866 The Initial Max Value of QueryDatabaseTable won't be case-sensitive

Signed-off-by: Matt Burgess <mattyb149@apache.org>

This closes #1212
This commit is contained in:
Byunghwa Yun 2016-11-13 12:21:14 +09:00 committed by Matt Burgess
parent f0f75e7480
commit 2b6d6c25d8
2 changed files with 3 additions and 3 deletions

View File

@ -200,8 +200,8 @@ public class QueryDatabaseTable extends AbstractDatabaseFetchProcessor {
//If an initial max value for column(s) has been specified using properties, and this column is not in the state manager, sync them to the state property map
for(final Map.Entry<String,String> maxProp : maxValueProperties.entrySet()){
if(!statePropertyMap.containsKey(maxProp.getKey())){
statePropertyMap.put(maxProp.getKey(), maxProp.getValue());
if (!statePropertyMap.containsKey(maxProp.getKey().toLowerCase())) {
statePropertyMap.put(maxProp.getKey().toLowerCase(), maxProp.getValue());
}
}

View File

@ -635,7 +635,7 @@ public class QueryDatabaseTableTest {
cal.setTimeInMillis(0);
cal.add(Calendar.MINUTE, 5);
runner.setProperty("initial.maxvalue.created_on", dateFormat.format(cal.getTime().getTime()));
runner.setProperty("initial.maxvalue.CREATED_ON", dateFormat.format(cal.getTime().getTime()));
// Initial run with no previous state. Should get only last 4 records
runner.run();
runner.assertAllFlowFilesTransferred(QueryDatabaseTable.REL_SUCCESS, 1);