Uploaded image for project: 'Apache NiFi'
  1. Apache NiFi
  2. NIFI-8748

PutKudu Incorrect Date Conversion from String

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.13.2
    • Fix Version/s: 1.14.0
    • Component/s: Extensions
    • Labels:
      None

      Description

      The PutKudu processor uses NiFi DataTypeUtils.toDate() when converting from a NiFi Record to a Kudu PartialRow for date fields. This works as expected when the Record field value is a java.sql.Date, but can result in subtracting one day from the original value when the Record field value is a String. The problem occurs as a result of DataTypeUtils.getDateFormat() using a default Time Zone of GMT. As a result of using SimpleDateFormat.parse(), an input string of 2000-01-01 results in a java.sql.Date of 1999-12-31.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                exceptionfactory David Handermann
                Reporter:
                exceptionfactory David Handermann
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h 20m
                  1h 20m