arrow/csv: support writing and reading time64 columns

Open Beginner friendly
#1,714 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
79/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
go
Domain
data

Research direction

Read the arrow/csv writer and reader paths, then compare their time32 handling added in #1706. Add corresponding formatting with Time64.FormattedString and parsing with arrow.Time64FromString for time64[us] and time64[ns]; done means both CSV writing and reading accept those schema fields, including fractional precision.

Written by the indexing model from the issue text.

Description

Describe the enhancement requested

arrow/csv cannot write or read time64 columns:

  • csv.NewWriter panics with unsupported data type when the schema has a time64[us] or time64[ns] field.
  • csv.NewReader rejects time64 fields in the schema, so there is no way to read them back either.

#1706 adds time32[s] and time32[ms] to both sides (formatting with Time32.FormattedString, parsing with arrow.Time32FromString). time64 could follow the same shape with Time64.FormattedString and arrow.Time64FromString, which already handle microsecond and nanosecond fractions.

Raised in review of #1706: https://github.com/apache/arrow-go/pull/1706#discussion_r4743081212

Component(s)

Other

Dominant language
Assembly
Stars
423
Forks
188
Avg merge
1d 7h
Merged PRs (30d)
164

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-go

All issues in apache/arrow-go

Similar issues

More Data Engineering issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.