Skip to content

Conversation

@gaogaotiantian
Copy link
Contributor

What changes were proposed in this pull request?

Instead of checking if type is datetime64[ns], check if it's np.datetime64. We allow numpy datetime/timedelta objects with any unit to be converted to TimestampType.

Why are the changes needed?

We are supposed to support this anyway, but pandas 3 now has a smart unit system for timestamps so more often than not the unit is not ns.

We still can't convert it back, but this is at least one-direction.

Does this PR introduce any user-facing change?

Not really other than some code that won't work would work now.

How was this patch tested?

Locally it was recognized.

Was this patch authored or co-authored using generative AI tooling?

No.

@github-actions
Copy link

JIRA Issue Information

=== Sub-task SPARK-55226 ===
Summary: Recognize timestamp units other than [ns]
Assignee: None
Status: Open
Affected: ["4.2.0"]


This comment was automatically generated by GitHub Actions

@zhengruifeng
Copy link
Contributor

merged to master

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