Skip to content

Conversation

@jonathanc-n
Copy link
Contributor

Which issue does this PR close?

Closes #13968 .

Rationale for this change

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 Changes to the physical-expr crates core Core DataFusion crate labels Jan 7, 2025
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.

Thanks @jonathanc-n -- this one is looking nice 👌

.collect::<Result<Vec<Arc<dyn PhysicalExpr>>>>()
})
.collect::<Result<Vec<_>>>()?;
#[allow(deprecated)] // TODO: Remove in favour of MemoryExec
Copy link
Contributor

Choose a reason for hiding this comment

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

In this PR I think it would be good to port this code (in the physical planner) to use MemoryExec -- that way queries will run through MemoryExec and we will confidence that ValuesExec can really be removed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@alamb Should be fine now

@github-actions github-actions bot added the sqllogictest SQL Logic Tests (.slt) label Jan 8, 2025
)
}

fn compute_properties_as_value(schema: SchemaRef) -> PlanProperties {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think compute_properties could be reuse here. vec![batches] is len=1, pass ordering with &[].

Copy link
Contributor

Choose a reason for hiding this comment

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

is this something we should do prior to merging the PR?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@alamb Yes, just added it

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.

Thanks @jonathanc-n and @jayzhan211

The only thing I am not sure if we should do prior to merge is @jayzhan211's comment
https://github.com/apache/datafusion/pull/14032/files#r1907047878

.collect::<Result<Vec<_>>>()?;
let value_exec = ValuesExec::try_new(SchemaRef::new(exec_schema), exprs)?;
let value_exec =
MemoryExec::try_new_as_values(SchemaRef::new(exec_schema), exprs)?;
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

)
}

fn compute_properties_as_value(schema: SchemaRef) -> PlanProperties {
Copy link
Contributor

Choose a reason for hiding this comment

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

is this something we should do prior to merging the PR?

@alamb
Copy link
Contributor

alamb commented Jan 12, 2025

Thanks again @jonathanc-n and @jayzhan211 -- I merged up to resolve a conflict and will plan to merge when the tests are clean

@alamb
Copy link
Contributor

alamb commented Jan 12, 2025

🚀

@alamb alamb merged commit 0a2c027 into apache:main Jan 12, 2025
25 checks passed
@alamb
Copy link
Contributor

alamb commented Jan 27, 2025

BTW we got some feedback that the deprecation message could be improved on this PR. Here is a proposal:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Core DataFusion crate physical-expr Changes to the physical-expr crates sqllogictest SQL Logic Tests (.slt)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Deprecate ValuesExec and use MemoryExec

3 participants