Skip to content
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

feat(ir): experimental egraph integration #4478

Closed
wants to merge 31 commits into from
Closed

Conversation

kszucs
Copy link
Member

@kszucs kszucs commented Sep 9, 2022

egraph/egg is an alternative term rewriting system to matchpy thus this integration provides an alternative to #4437

It uses a refactored version of snake-egg python bindings from my fork

kszucs and others added 30 commits September 9, 2022 13:15
BREAKING CHANGE: use other methods for pinging the database
BREAKING CHANGE: functions, methods and classes marked as deprecated are removed now
BREAKING CHANGE: removed Node.root_tables() method, use ibis.expr.analysis.find_immediate_parent_tables() instead
The DestructValue expressions didn't have corresponding operation nodes.

BREAKING CHANGE: removed ir.DestructValue, ir.DestructScalar and ir.DestructColumn, use table.unpack() instead
BREAKING CHANGE: ibis.expr.lineage.lineage() is now removed
also make the Signature object validatable

BREAKING CHANGE: use ibis.common.validators.{Patameter, Signature} instead
Unify the result of pandas/dask with the rest of the backends

BREAKING CHANGE: Use timezone conversion functions to compute the original machine localized value
The objective of this refactor is to achieve a simpler, stricter and
more generic internal representation by removing intermediate Expression
objects so there is a single Expression object wrapping an Operation
tree only to provide the user-facing API but all the internals work with
homogeneous Operation trees.

BREAKING CHANGE: Expr(Op(Expr(Op(Expr(Op))))) is now represented as
Expr(Op(Op(Op))), so code using ibis internals must be migrated
…imported for types

BREAKING CHANGE: Removed Node.output_type in favor of abstractmethod Node.to_expr() which now must be explicitly implemented
…class for ops.Selection

BREAKING CHANGE: HasSchema is no longer available, directly subclass ops.TableNode and implement schema property instead
…dling

BREAKING CHANGE: Node.blocks() method has been removed.
… of the pandas backend

BREAKING CHANGE: removed ops.Node.inputs property, use the multipledispatched get_node_arguments() function in the pandas backend
previously node attributes contained tuple of other nodes which required additional isinstance checks for traversals, now all the traversable elements of the tree are node instances

BREAKING CHANGE: removed Node.flat_args(), directly use node.args property instead
…aming semantics

BREAKING CHANGE: node.has_resolved_name() is removed, use isinstance(node, ops.Named) instead; node.resolve_name() is removed use node.name instead
@cpcloud cpcloud added this to the 4.0.0 milestone Sep 9, 2022
@codecov
Copy link

codecov bot commented Sep 9, 2022

Codecov Report

Merging #4478 (47b651a) into 4.x.x (119a983) will decrease coverage by 2.80%.
The diff coverage is 94.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##            4.x.x    #4478      +/-   ##
==========================================
- Coverage   92.79%   89.99%   -2.81%     
==========================================
  Files         180      180              
  Lines       20088    19743     -345     
  Branches     2853     2907      +54     
==========================================
- Hits        18640    17767     -873     
- Misses       1090     1540     +450     
- Partials      358      436      +78     
Impacted Files Coverage Δ
ibis/backends/impala/__init__.py 86.14% <ø> (+0.21%) ⬆️
ibis/backends/impala/udf.py 82.75% <ø> (ø)
ibis/backends/postgres/__init__.py 100.00% <ø> (ø)
ibis/backends/pyarrow/operations.py 0.00% <0.00%> (ø)
ibis/common/dispatch.py 96.66% <ø> (+0.37%) ⬆️
ibis/common/geospatial.py 74.35% <ø> (-0.33%) ⬇️
ibis/common/grounds.py 92.20% <ø> (-4.49%) ⬇️
ibis/common/validators.py 92.23% <ø> (-6.47%) ⬇️
ibis/config.py 86.15% <ø> (ø)
ibis/expr/analysis.py 87.72% <ø> (-10.07%) ⬇️
... and 197 more

@github-actions
Copy link
Contributor

github-actions bot commented Sep 9, 2022

Test Results

       35 files         35 suites   1h 16m 14s ⏱️
  9 555 tests   7 628 ✔️ 1 927 💤 0
34 937 runs  27 403 ✔️ 7 534 💤 0

Results for commit 47b651a.

@kszucs kszucs force-pushed the 4.x.x branch 3 times, most recently from e0dd44f to 5054275 Compare September 16, 2022 18:47
@cpcloud
Copy link
Member

cpcloud commented Oct 6, 2022

@kszucs Should we close the matchpy PR in favor of this one?

@kszucs
Copy link
Member Author

kszucs commented Oct 6, 2022

Well, I'm not sure which one should be the preferred one. Going to rebase them for now.

@cpcloud cpcloud removed this from the 4.0.0 milestone Dec 29, 2022
@cpcloud cpcloud added the experimental Experimental features label Dec 29, 2022
@cpcloud cpcloud marked this pull request as draft December 29, 2022 16:11
@kszucs
Copy link
Member Author

kszucs commented Mar 28, 2023

Closing this in favor of #5781

@kszucs kszucs closed this Mar 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
experimental Experimental features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants