Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-31880

Bad Test in OrcColumnarRowSplitReaderTest

    XMLWordPrintableJSON

Details

    • Patch

    Description

      This is a development issue with, what looks like a buggy unit test.
       
      I tried to build Flink with a clean copy of the repository and I get:
       
      ```
      [INFO] Results:
      [INFO]
      [ERROR] Failures:
      [ERROR] OrcColumnarRowSplitReaderTest.testReadFileWithTypes:365
      expected: "1969-12-31"
      but was: "1970-01-01"
      [INFO]
      [ERROR] Tests run: 26, Failures: 1, Errors: 0, Skipped: 0
      ```
       
      I see the test is testing Date data types with `new Date(562423)` which is 9 minutes and 22 seconds after the epoch time, which is 1970-01-01 UTC time, or when I run that on my laptop in CST timezone, I get `Wed Dec 31 18:09:22 CST 1969`.
       
      I have a simple pull request ready which fixes this issue and uses the Java 8 LocalDate API instead which avoids time zones entirely.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              kurto Kurt Ostfeld
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: