Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Add a new TimeUnit for dotnet ticks

Open
#246 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
csharp
Domain
data

Research direction

Start by reviewing the existing TimeUnit options and the TimestampType conversion paths for C# DateTimeOffset. Determine the cross-ecosystem implications of adding a 100-nanosecond tick unit, and define the compatibility and serialization behavior that would constitute a complete proposal.

Written by the indexing model from the issue text.

Description

Describe the enhancement requested

When serializing a DateTimeOffset into an Arrow type, the TimestampType feels like a natural choice. However there is no time unit which fully represents both the precision and range of a C# DateTimeOffset. A DateTimeOffset tick is 100 nanoseconds long and the full range of representable values is between years 0001 and 9999 according to the documentation.

There are currently 2 options for TimeUnit when converting a C# DateTimeOffset to TimestampType

  • TimeUnit.Microseconds : Lose precision but be able to fully convert every valid DateTimeOffset to Timestamp
  • TimeUnit.Nanoseconds : Keep precision, but the range of representable calendar years is reduced to 1677 - 2262

Of course, users could serialize DateTimeOffset into a long in the Arrow Table and remember the type when deserializing. However, it would be nice to preserve the type information. Having a new TimeUnit equal to a tick would solve this tension.

I appreciate that adding a new time unit would be a fundamental change to arrow across more than just the .NET ecosystem, please let me know if this has been considered before or if the discussion needs to be moved elsewhere.

Dominant language
C#
Stars
41
Forks
31
Avg merge
1d 3h
Merged PRs (30d)
15

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from apache/arrow-dotnet

All issues in apache/arrow-dotnet

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.