Skip to content

Conversation

@mgrazianoc
Copy link

@mgrazianoc mgrazianoc commented Jun 9, 2025

Rationale for this change

Currently, the Swift implementation of Arrow does not support Timestamp, although they are available in the base C interface. This PR attempts to add its support by following the current implemented design pattern.

What changes are included in this PR?

  1. TimestampArray with some basic formatting utilities
  2. TimestampArrayBuilder
  3. Timestamp alias
  4. ArrowTimestampUnit, which includes extensively all the variants (seconds, milliseconds, microseconds and nanoseconds)
  5. ArrowTypeTimestamp from base Arrow
  6. ArrowType support for timestamp
  7. ArrowWriterHelper support for timestamp
  8. fromProto support for timestamp

It properly handles the presence or absence of timezone.

Are these changes tested?

Tests are included in both ArrayTests.swift and CDataTests.swift.

Are there any user-facing changes?

Yes - users can now work with Timestamp data types in Swift Arrow implementations. This is additive and doesn't break existing functionality.

@mgrazianoc mgrazianoc requested a review from kou as a code owner June 9, 2025 17:25
@github-actions
Copy link

github-actions bot commented Jun 9, 2025

Thanks for opening a pull request!

If this is not a minor PR. Could you open an issue for this pull request on GitHub? https://github.com/apache/arrow/issues/new/choose

Opening GitHub issues ahead of time contributes to the Openness of the Apache Arrow project.

Then could you also rename the pull request title in the following format?

GH-${GITHUB_ISSUE_ID}: [${COMPONENT}] ${SUMMARY}

or

MINOR: [${COMPONENT}] ${SUMMARY}

See also:

@mgrazianoc mgrazianoc changed the title [SWIFT] Add support for Timestamp data type GH-46754: [SWIFT] Add support for Timestamp data type Jun 9, 2025
@github-actions
Copy link

github-actions bot commented Jun 9, 2025

⚠️ GitHub issue apache/arrow-swift#32 has been automatically assigned in GitHub to PR creator.

@github-actions
Copy link

github-actions bot commented Jun 9, 2025

⚠️ GitHub issue #46754 has no components, please add labels for components.

@kou
Copy link
Member

kou commented Jun 9, 2025

We're moving the Swift implementation to https://github.com/apache/arrow-swift from apache/arrow.

Could you open a PR on apache/arrow-swift not here?

@kou kou closed this Jun 9, 2025
@mgrazianoc
Copy link
Author

Yes, will do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants