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 Field Display Drops Timestamp Precision #6949

Open
ryzhyk opened this issue Jan 7, 2025 · 1 comment
Open

Parquet Field Display Drops Timestamp Precision #6949

ryzhyk opened this issue Jan 7, 2025 · 1 comment

Comments

@ryzhyk
Copy link

ryzhyk commented Jan 7, 2025

convert_timestamp_millis_to_string and convert_timestamp_micros_to_string round the timestamp down to seconds, thus losing any fractional seconds when converting the timestamp to JSON:

fn convert_timestamp_millis_to_string(value: i64) -> String {

Wouldn't it be better to print the fractional seconds in the RFC3339 format using %.3f for millis and %.6f for micros, like so:

    format!("{}", dt.format("%Y-%m-%d %H:%M:%S%.3f %:z"))

This is a simple fix, and I am happy to create a PR, but was wondering if there's any reason for the current approach, which throws away fractional seconds.

@tustvold tustvold changed the title convert_timestamp_millis_to_string, convert_timestamp_micros_to_string lose sub-second precision Parquet Field Display Drops Timestamp Precision Jan 7, 2025
@tustvold
Copy link
Contributor

tustvold commented Jan 7, 2025

Printing the real timestamp makes sense to me, but I have little context on the record (non-arrow) APIs. FWIW the arrow APIs will be significantly faster and are better supported

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

No branches or pull requests

2 participants