-
Notifications
You must be signed in to change notification settings - Fork 295
refactor(ordinals): move binding step above micropartition + local execution #4425
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
Conversation
$expr, | ||
)? | ||
}; | ||
} |
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.
Love seeing this!
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.
Any chance you can port this to the existing one as well? Or out of scope?
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.
Actually scratch that, why keep the original function? It looks like it's only used in src/daft-local-execution/src/sinks/aggregate.rs
and src/daft-local-execution/src/sinks/grouped_aggregate.rs
, both of which are updated in this PR
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.
The original function is still used in the legacy (py+ray runner) physical plan translation. I'll make a subsequent PR (should be a small one) to use bound columns in the legacy physical plan too, and once I do that, the original function can be removed.
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.
Looks great, thanks! Leaving the approval to Colin just in case, but have 1 question
$expr, | ||
)? | ||
}; | ||
} |
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.
Any chance you can port this to the existing one as well? Or out of scope?
$expr, | ||
)? | ||
}; | ||
} |
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.
Actually scratch that, why keep the original function? It looks like it's only used in src/daft-local-execution/src/sinks/aggregate.rs
and src/daft-local-execution/src/sinks/grouped_aggregate.rs
, both of which are updated in this PR
pub root_dir: String, | ||
pub write_mode: WriteMode, | ||
pub file_format: FileFormat, | ||
pub partition_cols: Option<Vec<ExprRef>>, | ||
pub partition_cols: Option<Vec<E>>, |
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.
If we bind in the logical plan does that mean this can become Option<Vec> and we don't need the generics?
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.
Yep exactly. Once we finish the refactor, we should only allow this to hold a BoundExpr
fn pyexpr_to_bound(&self, expr: PyExpr) -> DaftResult<BoundExpr> { | ||
BoundExpr::try_new(expr.into(), &self.inner.schema) | ||
} | ||
|
||
fn pyexprs_to_bound(&self, exprs: Vec<PyExpr>) -> DaftResult<Vec<BoundExpr>> { | ||
exprs.into_iter().map(|e| self.pyexpr_to_bound(e)).collect() | ||
} | ||
} |
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.
seems weird that these are methods on pymicropartition, could you just make the bind_all
method take in into ExprRef
?
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.
Good idea, changed it to that
Changes Made
continuation of the refactor, this time moving column binding above the
daft-local-execution
anddaft-micropartition
crates.After this, we can start working on binding in the logical plan!!
Related Issues
#4270
Checklist
docs/mkdocs.yml
navigation