Skip to content

Fix pa.Schema type annotations in schema_to_pyarrow#3261

Merged
geruh merged 1 commit intoapache:mainfrom
davidbzhao:davidz/pa-schema-return-type
Apr 21, 2026
Merged

Fix pa.Schema type annotations in schema_to_pyarrow#3261
geruh merged 1 commit intoapache:mainfrom
davidbzhao:davidz/pa-schema-return-type

Conversation

@davidbzhao
Copy link
Copy Markdown
Contributor

Rationale for this change

The schema_for_pyarrow return type is pa.schema but should pa.Schema. pa.schema is the factory method (pyarrow docs) whereas pa.Schema is the class it constructs (pyarrow docs).

Are these changes tested?

Just a type change. make lint passes.

Are there any user-facing changes?

No

Copy link
Copy Markdown
Contributor

@rambleraptor rambleraptor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great find! Thanks for doing this

Copy link
Copy Markdown
Member

@geruh geruh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, schema is a factory function!

@geruh geruh changed the title refactor: Correct return type annotation for schema_to_pyarrow Fix pa.Schema type annotations in schema_to_pyarrow Apr 21, 2026
@geruh geruh merged commit c6a6c06 into apache:main Apr 21, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants