Skip to content

Conversation

@waynexia
Copy link
Member

Which issue does this PR close?

Rationale for this change

When creating a MemTable with no partition (vec![]), we will get an error later like this does not satisfy distribution requirements: SinglePartition. Child-0 output partitioning: UnknownPartitioning(0)\"))". Because an execution plan should have at least one partition.

What changes are included in this PR?

This API is kinda error-prone, so this patch adds a check to make sure MemTable has at least one partition. It also fixes several existing examples that use vec![] instead of vec![vec![]]

Are these changes tested?

Are there any user-facing changes?

@github-actions github-actions bot added documentation Improvements or additions to documentation core Core DataFusion crate catalog Related to the catalog crate labels Jul 11, 2025
Signed-off-by: Ruihang Xia <[email protected]>
Copy link
Contributor

@2010YOUY01 2010YOUY01 left a comment

Choose a reason for hiding this comment

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

LGTM, thank you.

waynexia and others added 2 commits July 12, 2025 07:59
Signed-off-by: Ruihang Xia <[email protected]>
@waynexia waynexia merged commit c01c71f into apache:main Jul 12, 2025
28 checks passed
@waynexia
Copy link
Member Author

Thanks for your review ❤️

@waynexia waynexia deleted the memtable-partition branch July 12, 2025 17:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

catalog Related to the catalog crate core Core DataFusion crate documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants