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

ExecuteSQL/ExecuteSQLRecord convert to Avro date type incorrectly when set 'Use Avro Logical Types' to true

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 1.10.0
    • Extensions
    • None

    Description

       

      '2019-01-01' will consider to be '2019-01-01 00:00:00' which 1546300800000L milliseconds in UTC.

      But in other time zone such as '+08:00', do "select date('2019-01-01')" and result.getObject() or result.getDate() will return java.sql.Date object but java.sql.Date.getTime() return 1546272000000L instead of 1546300800000L which it's 8 hours earlier.

      Currently, ExecuteSQL return "(java.sql.Date.getTime() - 0) / 86400000" as epoch days

      Attachments

        Issue Links

          Activity

            People

              archon archon gum
              archon archon gum
              Votes:
              0 Vote for this issue
              Watchers:
              3 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 - 0.5h
                  0.5h