Skip to content

GH-55652: [Python] Document the default cast safety setting - #55674

Open
ViktorBystrov72 wants to merge 1 commit into
apache:mainfrom
ViktorBystrov72:fix/cast-safety-docs
Open

ViktorBystrov72 wants to merge 1 commit into
apache:mainfrom
ViktorBystrov72:fix/cast-safety-docs

Conversation

@ViktorBystrov72

Copy link
Copy Markdown

Rationale for this change

Fixes #55652. The cast APIs use safe=None in their signatures. Their docstrings list True as the default.

What changes are included in this PR?

Document the None default on the compute function and six cast methods. Explain that omitting CastOptions makes None request a safe cast.

Are these changes tested?

Checked the seven source docstrings against their signatures and exercised the default and explicit unsafe modes on PyArrow 26.0.1. The compute function and expression method were also checked with explicit CastOptions.

Are there any user-facing changes?

The API documentation now shows the signature default and explains how it affects a cast.

Was AI used for this PR?

Codex drafted and reviewed the docstring edits and this description.

PR code and description written by

  • Human
  • AI

Reviewed before submission by

  • Human
  • AI
  • Not reviewed

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.

[Python] cast() default discrepancy

1 participant