Skip to content
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

feat(optimizer): refactor table desc && SeqScan && SeqScan pk derive && SeqScan serialize (#1250) #1258

Merged
merged 2 commits into from
Mar 25, 2022

Conversation

skyzh
Copy link
Contributor

@skyzh skyzh commented Mar 25, 2022

What's changed and what's your intention?

the LogicalScan BatchScan StreamScanhas not enough information to serialize to a plan for CN, so add the tableDesc in the LogicalScan.

  • refactor TableDesc add all columns
  • refactor LogicalSeqScan
  • use LogicalValues instead of LogicalSeqScan for some unit test. BTW, we will use optimizer: add mock plan node just for test #1253 to do the optimizer unit test
  • pk_derive for LogicalSeqScan and StreamScan

Checklist

  • I have written necessary docs and comments
  • I have added necessary unit tests and integration tests

Refer to a related PR or issue link (optional)

Exactly the same as #1250

Copy link
Contributor

@st1page st1page left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

Copy link
Member

@BugenZhao BugenZhao left a comment

Choose a reason for hiding this comment

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

Rest LGTM.

rust/frontend/src/handler/create_source.rs Outdated Show resolved Hide resolved
rust/frontend/src/handler/create_source.rs Outdated Show resolved Hide resolved
rust/frontend/src/handler/drop_table.rs Outdated Show resolved Hide resolved
let fields = required_col_idx
.iter()
.enumerate()
.map(|(op_idx, tb_idx)| {
Copy link
Member

Choose a reason for hiding this comment

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

Is op_idx the index of the output? Please use a more detailed name.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Let's ask the original PR author 🤪

Copy link
Member

Choose a reason for hiding this comment

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

@TennyZhuang TennyZhuang enabled auto-merge (squash) March 25, 2022 03:33
@BugenZhao BugenZhao disabled auto-merge March 25, 2022 03:33
@skyzh skyzh force-pushed the skyzh/refactor_table_desc branch from d8b7e3e to 3a21ce1 Compare March 25, 2022 03:34
Signed-off-by: Alex Chi <iskyzh@gmail.com>
@st1page
Copy link
Contributor

st1page commented Mar 25, 2022

Rest LGTM.

I will fix them in the another PR, and we will merge this first to not blocking others

@st1page st1page enabled auto-merge (squash) March 25, 2022 03:36
@skyzh skyzh changed the title feat(optimizer): refactor table desc && SeqScan && SeqScan pk derive && SeqScan serialize feat(optimizer): refactor table desc && SeqScan && SeqScan pk derive && SeqScan serialize (#1250) Mar 25, 2022
@st1page st1page merged commit 7ec7f8f into main Mar 25, 2022
@st1page st1page deleted the skyzh/refactor_table_desc branch March 25, 2022 03:49
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.

3 participants