Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[parquet] Not following the spec for TIMESTAMP_MILLIS legacy converted types #4308

Closed
sergiimk opened this issue May 29, 2023 · 1 comment · Fixed by #4309
Closed

[parquet] Not following the spec for TIMESTAMP_MILLIS legacy converted types #4308

sergiimk opened this issue May 29, 2023 · 1 comment · Fixed by #4309
Labels
bug parquet Changes to the parquet crate

Comments

@sergiimk
Copy link
Contributor

Describe the bug

Parquet spec prescribes that for backward compatibility the legacy converted type TIMESTAMP_MILLIS should be interpreted as logical type TimestampType (isAdjustedToUTC = true, unit = MILLIS), but that's currently not the case.

To Reproduce

Read a modern Parquet file with schema:

message x {
  REQUIRED INT64 system_time (TIMESTAMP(MILLIS,true));
}

observe data type Timestamp(Millisecond, Some("UTC"))

Read an old Parquet file with schema:

message x {
  REQUIRED INT64 system_time (TIMESTAMP_MILLIS);
}

observe data type: Timestamp(Millisecond, None)

TIMESTAMP_MILLIS gets incorrectly interpreted as naive/local timestamp.

Expected behavior

Because spec prescribes that TIMESTAMP_MILLIS should be interpreted as TIMESTAMP(MILLIS,true) I expected to see a timestamp with UTC timezone.

Additional context

These lines seem to be the source of the problem

@tustvold
Copy link
Contributor

tustvold commented Jun 2, 2023

label_issue.py automatically added labels {'parquet'} from #4309

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug parquet Changes to the parquet crate
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants