NIFI-4903 - Fixed timestamp bug with fetch processors using Oracle 12+

Signed-off-by: Pierre Villard <pierre.villard.fr@gmail.com>

This closes #2488.
This commit is contained in:
Matthew Burgess 2018-02-22 13:50:08 -05:00 committed by Pierre Villard
parent d75f118ae1
commit 62732cbb88
1 changed files with 1 additions and 1 deletions

View File

@ -446,7 +446,7 @@ public abstract class AbstractDatabaseFetchProcessor extends AbstractSessionFact
case TIME: case TIME:
return "'" + value + "'"; return "'" + value + "'";
case TIMESTAMP: 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 // 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 // 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 // "timestamp" coercion in that case