Skip to content

Conversation

grihabor
Copy link

Description of changes

I've been running mypy and changing a bunch of type definitions for pyspark backend to be fully typed. Now mypy has no errors in the pyspark backend module if you run it like this:

uv venv
uv pip install .[pyspark,polars] mypy pytest pandas-stubs pyarrow-stubs
uv run mypy ibis/backends/pyspark/

Some of the changes are very opinionated and are open for discussion

@github-actions github-actions bot added pyspark The Apache PySpark backend datatypes Issues relating to ibis's datatypes (under `ibis.expr.datatypes`) sql Backends that generate SQL labels Jul 23, 2025
@grihabor grihabor marked this pull request as draft July 23, 2025 22:41
@github-actions github-actions bot added the tests Issues or PRs related to tests label Jul 23, 2025
@cpcloud
Copy link
Member

cpcloud commented Jul 24, 2025

Not opposed to this but can you make only the typing changes and move variable renaming to a different PR?

@grihabor
Copy link
Author

and move variable renaming to a different PR

Unfortunately, mypy doesn't allow reassigning variables with values of a different type. So using the same variable names is actually breaking type checking

@grihabor
Copy link
Author

I could do it in separate pr, but that would be just more confusing. I think the intention is more clear when everything related to typing is in one pr

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
datatypes Issues relating to ibis's datatypes (under `ibis.expr.datatypes`) pyspark The Apache PySpark backend sql Backends that generate SQL tests Issues or PRs related to tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants