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

ASF subversion and git services commented on NIFI-14226:
--------------------------------------------------------

Commit 9b92145b787c9aa086096292fbbd0742eded418b in nifi's branch 
refs/heads/main from dan-s1
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=9b92145b787 ]

NIFI-14226 Fixed GenerateRecord handling of Avro timestamp logical types 
(#11007)

Signed-off-by: David Handermann <[email protected]>

> GenerateRecord cannot cast Instant to Date
> ------------------------------------------
>
>                 Key: NIFI-14226
>                 URL: https://issues.apache.org/jira/browse/NIFI-14226
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Core Framework
>    Affects Versions: 2.2.0
>            Reporter: Dorian Bugeja
>            Assignee: Daniel Stieglitz
>            Priority: Major
>         Attachments: Using_Instant_for_Fake_Date.patch
>
>          Time Spent: 50m
>  Remaining Estimate: 0h
>
> When using GenerateRecord with Avro schema defined for logicalTypes 
> time-micros and/or timestamp-millis,  error "Java.time.Instant cannot be cast 
> to java.util.Date" is thrown.
> issue in in FakerUtil.java
> at lines
> 408
> {code:java}
> Date fakeDate = (Date) FakerUtils.getFakeData(DEFAULT_DATE_PROPERTY_NAME, 
> faker);{code}
> and 412
> {code:java}
> return ((Date) FakerUtils.getFakeData(DEFAULT_DATE_PROPERTY_NAME, 
> faker)).getTime(); {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to