Skip to content

Conversation

@waynexia
Copy link
Member

@waynexia waynexia commented Aug 1, 2024

Which issue does this PR close?

Related to #11375

Rationale for this change

Try to break large lib.rs into small and dedicated files. Take the largest one as the beginning.

During refactoring, I find this does help in improving readability. Like previous to this patch, re-exports (pub use crate::xxx) are mixed with import (use xxx).

What changes are included in this PR?

Move ExecutionPlan and related structs/methods into execution_plan.rs.

For compatibility, all items are re-exported in lib.rs so others need not change their code to reference related structs.

One thing I'm not sure about is whether we need another mod like exec_util for those functions in execution_plan like collect, collect_partitioned or execute_input_stream.

Are these changes tested?

No need

Are there any user-facing changes?

No

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 @waynexia -- this looks like a nice improvement to me

cc @comphead

use crate::coalesce_partitions::CoalescePartitionsExec;
use crate::display::DisplayableExecutionPlan;
pub use crate::display::{DefaultDisplay, DisplayAs, DisplayFormatType, VerboseDisplay};
pub(crate) use crate::execution_plan::execution_mode_from_children;
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 these pub use means that this will have no effect on users use paths

@alamb alamb merged commit 0332eb5 into apache:main Aug 2, 2024
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.

3 participants