Skip to content

[pixels-core] date column writer produces the wrong date number #419

@yuly16

Description

@yuly16

Reproduce the issue:

First, we create a table with a date column, the filename is test_date.tbl. The file only contains 6 rows:

image

We call pixels-sink to generate test_date.pxl file, and then use trino:

image

The date in test_date.pxl is different from test_date.tbl.

The problematic function is millisToDay in DatetimeUtils.java. When writing the date to pxl file, millisToDay is responsible for translating Date to int. The scratch date is 1970-01-01. However, I notice that this function translates 1970-01-02 to 0, while the correct anwser should be 1.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions