From 62732cbb8827d0e41dde90af325775a727501f45 Mon Sep 17 00:00:00 2001 From: Matthew Burgess Date: Thu, 22 Feb 2018 13:50:08 -0500 Subject: [PATCH] NIFI-4903 - Fixed timestamp bug with fetch processors using Oracle 12+ Signed-off-by: Pierre Villard This closes #2488. --- .../processors/standard/AbstractDatabaseFetchProcessor.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/AbstractDatabaseFetchProcessor.java b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/AbstractDatabaseFetchProcessor.java index 21459291e7..15f9738a8e 100644 --- a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/AbstractDatabaseFetchProcessor.java +++ b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/AbstractDatabaseFetchProcessor.java @@ -446,7 +446,7 @@ public abstract class AbstractDatabaseFetchProcessor extends AbstractSessionFact case TIME: return "'" + value + "'"; case TIMESTAMP: - if ("Oracle".equals(databaseType)) { + if (!StringUtils.isEmpty(databaseType) && databaseType.contains("Oracle")) { // For backwards compatibility, the type might be TIMESTAMP but the state value is in DATE format. This should be a one-time occurrence as the next maximum value // should be stored as a full timestamp. Even so, check to see if the value is missing time-of-day information, and use the "date" coercion rather than the // "timestamp" coercion in that case