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

Use LexRequirement alias as much as possible #12130

Merged
merged 2 commits into from
Aug 24, 2024

Conversation

lewiszlw
Copy link
Member

@lewiszlw lewiszlw commented Aug 23, 2024

Which issue does this PR close?

Closes #.

Rationale for this change

Make type name shorter.

What changes are included in this PR?

Are these changes tested?

Are there any user-facing changes?

@github-actions github-actions bot added physical-expr Physical Expressions optimizer Optimizer rules core Core DataFusion crate labels Aug 23, 2024
@alamb alamb changed the title Use LexRequirement alias as possible Use LexRequirement alias as much as possible Aug 23, 2024
Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

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

Thank you @lewiszlw -- this is a very nice improvement in my opinion

I have always thought that making LexRequirement an actual struct with methods and documentation would be even better

For example, something like

/// Describes a lexical (multi-column) sort requirement
struct LexRequirement {
  inner: Vec<PhysicalSortRequirement>>
}

impl LexRequirement { 
// documented methods here
...
}

Otherwise the rust docs just show as Vec<PhysicalSortRequirement> and it is unclear what operations are used

Maybe something to consider in a follow on PR

@lewiszlw
Copy link
Member Author

Making LexRequirement an actual strucM looks like a good idea. I'll try it in my free time.

@lewiszlw lewiszlw merged commit 3b90e3e into apache:main Aug 24, 2024
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Core DataFusion crate optimizer Optimizer rules physical-expr Physical Expressions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants