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

Unable to write Timestamp Logical Type #492

Closed
kharlm16 opened this issue Mar 25, 2024 · 3 comments · Fixed by #521
Closed

Unable to write Timestamp Logical Type #492

kharlm16 opened this issue Mar 25, 2024 · 3 comments · Fixed by #521

Comments

@kharlm16
Copy link

Issue description

Issue

Writing DateTimes using DateTimeDataField uses TIMESTAMP_MILLIS Converted Type instead of TIMESTAMP(isAdjusted, unit) Logical Type.
Is this by design or are there any plans to support writing TIMESTAMP logical type?

@kharlm16 kharlm16 changed the title Support for writing Timestamp Logical Unable to write Timestamp Logical Type Apr 17, 2024
@aloneguid
Copy link
Owner

I have no plans to support this at the moment, so happy for you to pick it up.

@kja-xyt
Copy link

kja-xyt commented Jul 4, 2024

It would be great to have it (NANOS to be specific). Files written with Apache Arrow have something like that in Thrift Metadata:

      {
        "Path": "MyNanoTime",
        "Type": "INT64",
        "TypeLength": null,
        "LogicalType": {
          "Name": "TIME",
          "IsAdjustedToUTC": false,
          "Unit": "NANOS"
        },
        "RepetitionType": "REQUIRED",
        "ConvertedType": "",
        "Children": []
      },

and you can read them in Python without the need to cast anything.

@cliedeman
Copy link
Contributor

cliedeman commented Jul 8, 2024

@kja-xyt DateTime in dotnet doesn't have nanosecond precision though. So I don't recommend using it if you need that level of accuracy.

https://learn.microsoft.com/en-us/dotnet/api/system.datetime.ticks?view=net-8.0#remarks

The max precision is 100 nanoseconds

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

Successfully merging a pull request may close this issue.

4 participants