-
Notifications
You must be signed in to change notification settings - Fork 596
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: port the internals to use koerce
#10078
base: main
Are you sure you want to change the base?
Conversation
b8afaef
to
f07026d
Compare
Benchmarking against Benchmarks:
|
|
Makes sense. It seems like that might not be representative of an actual workload though. |
In any case a perf improvement + 10k fewer lines of code seems like an great improvement! |
Seems like we can delete some of these fully-commented out test modules. |
return self.__argnames__ | ||
|
||
|
||
ValidationError = SignatureValidationError = (MatchError, ValueError, TypeError) |
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.
Koerce should introduce a proper error type, that needs to be updated.
@@ -463,15 +462,15 @@ def is_variadic(self) -> bool: | |||
|
|||
|
|||
@public | |||
class Unknown(DataType, Singleton): |
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.
koerce.Annotable
now supports singleton, so this can be restored by using class Unknown(DataType, singleton=True)
@@ -2483,7 +2482,7 @@ class NullValue(Value): | |||
|
|||
|
|||
@public | |||
class NullScalar(Scalar, NullValue, Singleton): | |||
class NullScalar(Scalar, NullValue): |
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.
Expr
is not a subclass of Annotable
so singleton=True
cannot be used here, although we could turn Expr
into Annotable
as well, should benchmark the impact of that.
869aa3b
to
665c5f4
Compare
@@ -4300,7 +4302,8 @@ def pivot_wider( | |||
rules = ( | |||
# add in the where clause to filter the appropriate values | |||
p.Reduction(where=None) >> _.copy(where=where) | |||
| p.Reduction(where=x) >> _.copy(where=where & x) | |||
# TODO(kszucs) | |||
# | p.Reduction(where=+x) >> _.copy(where=where & x) |
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.
I am not sure that we actually need this.
Thinking about this some more, I think we want to keep the pattern system inside Ibis for now. While the performance gains are nice, the development overhead of developing two libraries simultaneously is quite high, even if the library remained pure Python. Adding Cython to the mix complicates the picture. cc @jcrist for thoughts |
It can be used as a pure python package as well, at least the intention is not to hurt compatibility. |
TBD