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(frontend): add StreamMaterialize node #1033

Merged
merged 2 commits into from
Mar 18, 2022
Merged

Conversation

skyzh
Copy link
Contributor

@skyzh skyzh commented Mar 17, 2022

Signed-off-by: Alex Chi [email protected]

What's changed and what's your intention?

As title. Not sure if this is the correct way to add MaterializeNode...

Constructing this node also requires a ctx. Now we get the ctx from logical node.

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)

ref #961


impl fmt::Display for StreamMaterialize {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "StreamMaterialize")
Copy link
Member

@fuyufjh fuyufjh Mar 17, 2022

Choose a reason for hiding this comment

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

Suggested change
write!(f, "StreamMaterialize")
f.debug_struct("StreamMaterialize")
// table_id, perhaps
.finish()

@codecov
Copy link

codecov bot commented Mar 17, 2022

Codecov Report

Merging #1033 (4bb3710) into main (80063ef) will increase coverage by 0.00%.
The diff coverage is 69.69%.

@@            Coverage Diff            @@
##               main    #1033   +/-   ##
=========================================
  Coverage     71.86%   71.86%           
  Complexity     2766     2766           
=========================================
  Files           995      996    +1     
  Lines         83549    83581   +32     
  Branches       1790     1790           
=========================================
+ Hits          60039    60063   +24     
- Misses        22619    22627    +8     
  Partials        891      891           
Flag Coverage Δ
java 61.01% <ø> (ø)
rust 74.40% <69.69%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
rust/frontend/src/optimizer/plan_node/mod.rs 64.40% <ø> (ø)
...tend/src/optimizer/plan_node/stream_materialize.rs 66.66% <66.66%> (ø)
rust/frontend/src/optimizer/mod.rs 97.50% <100.00%> (+0.04%) ⬆️
rust/common/src/types/ordered_float.rs 22.31% <0.00%> (-0.20%) ⬇️
rust/common/src/catalog/mod.rs 70.94% <0.00%> (+2.56%) ⬆️

📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

@skyzh skyzh force-pushed the skyzh/add-materialize-node branch from 2e62af8 to fa84c74 Compare March 18, 2022 03:11
@skyzh skyzh requested a review from fuyufjh March 18, 2022 03:11
@skyzh skyzh enabled auto-merge (squash) March 18, 2022 03:39
Copy link
Member

@fuyufjh fuyufjh left a comment

Choose a reason for hiding this comment

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

LGTM

input: PlanRef,
schema: Schema,
table_id: TableId,
}
Copy link
Member

Choose a reason for hiding this comment

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

To complete the MaterializeNode node for compute nodes, it's also necessary to know the column ids of each field in schema as well as the columns of primary keys.

https:/singularity-data/risingwave-dev/blob/d0664211600fa4d28cd2aa493a52015b5592cd0e/proto/stream_plan.proto#L30-L40

However, I am not sure whether these fields be placed in plan nodes. Let's decide this when working on its to_prost

@skyzh skyzh merged commit 1a49de9 into main Mar 18, 2022
@skyzh skyzh deleted the skyzh/add-materialize-node branch March 18, 2022 06:04
pangzhenzhou pushed a commit that referenced this pull request Mar 28, 2022
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.

2 participants