Skip to content

UNPIVOT command #24

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

Merged
merged 5 commits into from
May 21, 2025
Merged

UNPIVOT command #24

merged 5 commits into from
May 21, 2025

Conversation

Vedin
Copy link

@Vedin Vedin commented May 16, 2025

Which issue does this PR close?

  • Closes #.

Rationale for this change

What changes are included in this PR?

Are these changes tested?

Are there any user-facing changes?

@Vedin
Copy link
Author

Vedin commented May 19, 2025

Note for the reviewers: test doc fails is currently expected. The clippy error is very weird. I figure it out later. If you want it to be clean I can just exclude this part from clippy for now.

@Vedin Vedin requested a review from osipovartem May 21, 2025 13:18
let mut builder = LogicalPlanBuilder::from(base_plan.clone())
.project(projection_exprs)?;

if null_inclusion

Choose a reason for hiding this comment

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

nitpick: if let Some(NullInclusion::ExcludeNulls) | None = null_inclusion {

for column_ident in &columns {
let column_name = column_ident.value.clone();

if let Some(idx) =

Choose a reason for hiding this comment

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

nitpick: I personally find it easier to read when with an "exit early" approach, subjectively this can be rewritten as

    let idx = if let Some(i) = base_schema.index_of_column_by_name(None, &column_name) {
        i
    } else {
        return plan_err!("Column '{}' not found in input", column_name);
    };

    let field = base_schema.field(idx);
    let field_type = field.data_type();

@Vedin Vedin merged commit 4eab4d9 into embucket-sync-df47.0.0 May 21, 2025
49 of 53 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants