mirror of https://github.com/apache/nifi.git
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:
parent
f0f75e7480
commit
2b6d6c25d8
|
@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue