Skip to content

feat: support partitioned table in TableScan and TableRead#145

Merged
JingsongLi merged 2 commits intoapache:mainfrom
QuakeWang:feat/partitioned-table-scan
Mar 25, 2026
Merged

feat: support partitioned table in TableScan and TableRead#145
JingsongLi merged 2 commits intoapache:mainfrom
QuakeWang:feat/partitioned-table-scan

Conversation

@QuakeWang
Copy link
Contributor

Purpose

Linked issue: close #131

Brief change log

Tests

API and Format

Documentation

@QuakeWang
Copy link
Contributor Author

@JingsongLi @XiaoHongbo-Hope @luoyuxia Hi PTAL, if you have time, thanks : )

Copy link
Contributor

@luoyuxia luoyuxia left a comment

Choose a reason for hiding this comment

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

@QuakeWang Thanks. Lgtm overall. Only one minor comment

@QuakeWang QuakeWang force-pushed the feat/partitioned-table-scan branch from b307801 to afe23ce Compare March 24, 2026 08:43
@QuakeWang QuakeWang force-pushed the feat/partitioned-table-scan branch from 29a84dd to 74009ee Compare March 24, 2026 08:44
@XiaoHongbo-Hope
Copy link

+1

rows.push((id.value(i), name.value(i).into(), dt.value(i).into()));
}
}
rows.sort_by_key(|(id, _, _)| *id);
Copy link
Contributor

Choose a reason for hiding this comment

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

rows.sort_by(|a, b| a.0.cmp(&b.0).then(a.2.cmp(&b.2))) sort by partition too to ensure the determination of result sequence.

};

for ((partition, bucket), group_entries) in groups {
let partition_row = if !partition_keys.is_empty() {
Copy link
Contributor

@JingsongLi JingsongLi Mar 24, 2026

Choose a reason for hiding this comment

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

It's best not to set partition_row to None. We can assign a Binary Row EMPTY static variable to the non partitioned table, just like Java.

So here, I think we can just use inaryRow::from_serialized_bytes and optimize it.

Copy link
Contributor

@JingsongLi JingsongLi left a comment

Choose a reason for hiding this comment

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

+1

@JingsongLi JingsongLi merged commit e1cb194 into apache:main Mar 25, 2026
8 checks passed
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.

Support partitioned table in TableScan and TableRead

4 participants