-
Notifications
You must be signed in to change notification settings - Fork 605
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: remove ibis NA #9323
Closed
Closed
refactor: remove ibis NA #9323
Changes from all commits
Commits
Show all changes
53 commits
Select commit
Hold shift + click to select a range
609e60b
refactor: deprecate fillna and dropna api
ncclementi 4e39c60
chore: update snapshot tests to use fillnull
ncclementi 4961302
chore: fix test_grouped_case to use dropnull
ncclementi ce14460
chore: fix parent function call
ncclementi bb138bb
chore: make sure test has def backend
ncclementi cad47e9
chore: fix docts examples to use dropnull
ncclementi 33b3f18
chore: remove execution test
ncclementi 3404252
test: move deprecationcheck out of backends
ncclementi e641be6
chore: consistent name
ncclementi a4c5cd3
test: add checkof deprec warn when usingfillna
ncclementi c8eac3c
chore: fix typo
ncclementi 5a0495e
chore: deprecate Value.fillna add fillnull
ncclementi a417ade
chore: update test_function to use fillnull
ncclementi 9f227a9
chore: update test_select to use fillnull
ncclementi 2d3144e
chore: update some impala tests to use fillnull
ncclementi 4b3634e
chore: update test_join to use fillnull
ncclementi 22b5617
chore: use fillnull in postgres tests when applies
ncclementi ee32a34
chore: update risingwave test_function to use fillnull
ncclementi 5a8047c
chore: fix typo
ncclementi 9a2bf8b
chore: update test_generic to use fillnull
ncclementi ffff32b
chore: fix Value.coalesce docs
ncclementi 88edd57
chore: replace filna for fillnull
ncclementi cd4db5b
chore: fixz docstrings and err msg
ncclementi e6d5c34
chore: update benchfuncs to use fillnull
ncclementi acdee1d
chore: update test_decimal to use fillnull
ncclementi 56df3ce
chore: update tes_sql_builtins to use fillnull
ncclementi 05ab774
chore: update test_table to use fillnull
ncclementi 4c86473
chore: update test_value_expr to use fillnull
ncclementi fc79809
docs: update docs where fillna was used and replaced for fillnull
ncclementi e388f15
chore: update impala test_cas_exprs tests to use fillnull
ncclementi d89b589
chore: update impala test_unary_builtins to use fillnull
ncclementi d1c2ced
chore: fix docstring
ncclementi 89935b9
chore: self.dropnull and self.fillnull in depr methods
ncclementi 7768dbe
chore: use drop_null instead of dropnull
ncclementi 21d1c73
chore: replace fillnull for fill_null
ncclementi a86d06f
chore: change version in deprcation warns
ncclementi 83b7457
refactor: remove ibis.NA
ncclementi 5093c95
chore: replace ibis.NA for ibis.null() in docs
ncclementi 06a2ff1
chore: fix merge conflict
ncclementi 8ef4637
chore: update dask tests to use ibis.null()
ncclementi ee3c232
chore: update impala tests to use ibis.null()
ncclementi e295d6b
chore: update pandas tests to use ibis.null()
ncclementi da4c9bf
chore: fixe merge conflict
ncclementi 04c4c8b
chore: fix conflict
ncclementi 0bc3285
chore: update sqlite tests to use ibis.null()
ncclementi 7e2a839
chore: fix conflict
ncclementi b726b7a
chore: fix conflict
ncclementi 5d3fd20
chore: removes ibis.NA from api docs
ncclementi 4270b32
chore: fix conflict
ncclementi ee40d9d
docs: update freeze of post
ncclementi 9db3bf5
chore: add NA and deprecation warn to getattr
ncclementi 64b98e5
test: add test for ibis.NA depr warn
ncclementi 224e4ff
chore: avoid execution in test_ibis_na_deprecation_warning
ncclementi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
9 changes: 5 additions & 4 deletions
9
docs/_freeze/posts/campaign-finance/index/execute-results/html.json
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
@@ -4,6 +4,9 @@ | |||||||||
|
||||||||||
__version__ = "9.0.0" | ||||||||||
|
||||||||||
import warnings | ||||||||||
from typing import Any | ||||||||||
|
||||||||||
from ibis import examples, util | ||||||||||
from ibis.backends import BaseBackend | ||||||||||
from ibis.common.exceptions import IbisError | ||||||||||
|
@@ -36,7 +39,7 @@ def __dir__() -> list[str]: | |||||||||
return sorted(out) | ||||||||||
|
||||||||||
|
||||||||||
def __getattr__(name: str) -> BaseBackend: | ||||||||||
def load_backend(name: str) -> BaseBackend: | ||||||||||
"""Load backends in a lazy way with `ibis.<backend-name>`. | ||||||||||
|
||||||||||
This also registers the backend options. | ||||||||||
|
@@ -125,3 +128,18 @@ def connect(*args, **kwargs): | |||||||||
setattr(proxy, name, getattr(backend, name)) | ||||||||||
|
||||||||||
return proxy | ||||||||||
|
||||||||||
|
||||||||||
def __getattr__(name: str) -> Any: | ||||||||||
if name == "NA": | ||||||||||
warnings.warn( | ||||||||||
"Accessing 'ibis.NA' is deprecated as of v9.1 and will be removed in a future version. " | ||||||||||
"Use 'ibis.null()' instead.", | ||||||||||
Comment on lines
+136
to
+137
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
DeprecationWarning, | ||||||||||
stacklevel=2, | ||||||||||
) | ||||||||||
import ibis | ||||||||||
|
||||||||||
return ibis.null() | ||||||||||
Comment on lines
+141
to
+143
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this should work instead, since
Suggested change
|
||||||||||
else: | ||||||||||
return load_backend(name) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we already had a
__getattr__
I went this route to keep the typing for theload_backend
portion. Once we deprecate NA completely we can remove the workaround