[ 
https://issues.apache.org/jira/browse/NIFI-4903?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16376158#comment-16376158
 ] 

ASF GitHub Bot commented on NIFI-4903:
--------------------------------------

Github user zenfenan commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/2488#discussion_r170459537
  
    --- Diff: 
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/AbstractDatabaseFetchProcessor.java
 ---
    @@ -446,7 +446,7 @@ protected static String getLiteralByType(int type, 
String value, String database
                 case TIME:
                     return "'" + value + "'";
                 case TIMESTAMP:
    -                if ("Oracle".equals(databaseType)) {
    +                if (!StringUtils.isEmpty(databaseType) && 
databaseType.contains("Oracle")) {
    --- End diff --
    
    How about using `equalsIgnoreCase` in checking if databaseType contains 
oracle? It's trivial but a safety check, IMHO, in case some one changes the 
`getName` in `DatabaseAdapter` implementations.


> Database Fetch processors cannot handle timestamp fields with Oracle 12+
> ------------------------------------------------------------------------
>
>                 Key: NIFI-4903
>                 URL: https://issues.apache.org/jira/browse/NIFI-4903
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Extensions
>            Reporter: Matt Burgess
>            Assignee: Matt Burgess
>            Priority: Major
>             Fix For: 1.6.0
>
>
> When using GenerateTableFetch or QueryDatabaseTable with an Oracle 12+ 
> adapter, if the maximum value column is set to a column of type timestamp, 
> then upon the second fetch the following error occurs:
> java.sql.SQLDataException: ORA-01843: not a valid month
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to