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

Rescope expression then the identity is a struct dtype #1887

Merged
merged 25 commits into from
Jan 11, 2025
Merged

Conversation

joseph-isaacs
Copy link
Member

@joseph-isaacs joseph-isaacs commented Jan 10, 2025

Defines a transform on expression with an scope type of struct(..). The transform splits the expr in to a series of expressions that can be evaluated only using a single field of the struct, and a combination expr which combines the series of smaller expr into the original expr.

This is used #1893.

@joseph-isaacs joseph-isaacs changed the title Rescope expression then the identity is a struct dtype [wip] Rescope expression then the identity is a struct dtype Jan 10, 2025
@joseph-isaacs joseph-isaacs changed the title [wip] Rescope expression then the identity is a struct dtype Rescope expression then the identity is a struct dtype Jan 10, 2025
@joseph-isaacs joseph-isaacs enabled auto-merge (squash) January 10, 2025 17:37
Copy link
Contributor

@gatesn gatesn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wanted to unblock the other PRs here so I went ahead and renamed the "split" to partition and turned the type alias into a struct.

Please add more docstrings in future! They will become mandatory under #1905

@@ -23,6 +23,14 @@ pub struct Select {
child: ExprRef,
}

pub fn select(columns: Vec<Field>, child: ExprRef) -> ExprRef {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought these were fields, not columns?

use crate::traversal::{FoldChildren, FoldUp, FolderMut, Node};
use crate::{ExprRef, GetItem, Pack};

pub struct ExprSimplify();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove ()

@gatesn gatesn disabled auto-merge January 11, 2025 14:44
@gatesn gatesn enabled auto-merge (squash) January 11, 2025 14:47
@gatesn gatesn merged commit b1dbfe7 into develop Jan 11, 2025
21 checks passed
@gatesn gatesn deleted the ji/rescope-exprs branch January 11, 2025 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants