Github user mattyb149 commented on a diff in the pull request:
https://github.com/apache/nifi/pull/1664#discussion_r111008309
--- Diff:
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/AbstractDatabaseFetchProcessor.java
---
@@ -413,7 +400,7 @@ protected static String getLiteralByType(int type,
String value, String database
case TIMESTAMP:
// Timestamp literals in Oracle need to be cast with
TO_DATE
if ("Oracle".equals(databaseType)) {
- return "to_date('" + value + "', 'yyyy-mm-dd
HH24:MI:SS')";
+ return "timestamp '" + value + "'";
--- End diff --
This probably breaks backwards compatibility if the processor has already
stored a Date (no time-of-day) into the StateMap. To preserve backwards
compatibility, we should check if the value is just a Date and use the "date"
coercion instead of the "timestamp" coercion. If that succeeds, then the next
maximum value observed should be stored as a full timestamp and the "date"
coercion should no longer be executed
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---