You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2023/04/21 21:55:00 UTC

[jira] [Updated] (FLINK-31880) Bad Test in OrcColumnarRowSplitReaderTest

     [ https://issues.apache.org/jira/browse/FLINK-31880?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

ASF GitHub Bot updated FLINK-31880:
-----------------------------------
    Labels: pull-request-available  (was: )

> Bad Test in OrcColumnarRowSplitReaderTest
> -----------------------------------------
>
>                 Key: FLINK-31880
>                 URL: https://issues.apache.org/jira/browse/FLINK-31880
>             Project: Flink
>          Issue Type: Bug
>          Components: Connectors / ORC, Formats (JSON, Avro, Parquet, ORC, SequenceFile)
>            Reporter: Kurt Ostfeld
>            Priority: Minor
>              Labels: pull-request-available
>
> 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.



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