-
Notifications
You must be signed in to change notification settings - Fork 676
feat(frontend): add refreshable property & refresh command #22619
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
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
75e6f3a
to
09dedc4
Compare
09dedc4
to
5b518e5
Compare
5b518e5
to
a409585
Compare
fn is_refreshable_connector(&self) -> bool { | ||
false | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This decides whether a table can be refreshed. So not possible to create refreshable table in this PR
a409585
to
6f04b2b
Compare
Looks like this PR extends new SQL syntax or updates existing ones. Make sure that:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Refresh Syntax Parsing Error
The REFRESH
statement parser incorrectly mandates the TABLE
keyword (REFRESH TABLE <table_name>
). This conflicts with existing test data and the AST display format, which both imply REFRESH <table_name>
is the expected syntax, leading to parsing failures for the simpler form.
src/sqlparser/src/parser.rs#L377-L381
risingwave/src/sqlparser/src/parser.rs
Lines 377 to 381 in 6f04b2b
pub fn parse_refresh(&mut self) -> ModalResult<Statement> { | |
self.expect_keyword(Keyword::TABLE)?; | |
let table_name = self.parse_object_name()?; | |
Ok(Statement::Refresh { table_name }) | |
} |
Bugbot free trial expires on July 29, 2025
Learn more in the Cursor dashboard.
Was this report helpful? Give feedback by reacting with 👍 or 👎
553fc73
to
23ca770
Compare
Signed-off-by: xxchan <[email protected]>
23ca770
to
03a7909
Compare
message LoadFinishMutation { | ||
// Associated source ID for this load operation. | ||
uint32 associated_source_id = 1; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need table_id here as RefreshStartMutation
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually I think for RefreshStartMutation
we also just need the source id, because currently StreamSource
only has source_id
, but not the corresponding table id, while MaterializeNode
has the catalog.Table
, containing both table_id
and associated_source_id
. 🤣
/// 1. Validates that the table exists and is refreshable | ||
/// 2. Sends a refresh command through the barrier system | ||
/// 3. Returns the result of the refresh operation | ||
pub async fn refresh_table(&self, request: RefreshRequest) -> MetaResult<RefreshResponse> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When manually triggering a refresh command, do we need to send the loadFinish command as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The loadFinish
command is triggered after SourceExec reporting data load finished. added in #22620
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/// 1. Validates that the table exists and is refreshable | ||
/// 2. Sends a refresh command through the barrier system | ||
/// 3. Returns the result of the refresh operation | ||
pub async fn refresh_table(&self, request: RefreshRequest) -> MetaResult<RefreshResponse> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rest LGTM
// Refresh command sent successfully | ||
tracing::info!( | ||
table_id = %table_id, | ||
table_name = %table_name, | ||
"Manual refresh initiated" | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it mean that we don't wait for REFRESH
to be finished?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. But in the future, we can make it a blocking command
I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.
What's changed and what's your intention?
First part of #22690. See the tracking issue for the whole picture of the user journey.
Frontend part.
Key changes include:
refreshable
flag to the table catalog to indicate whether a table supports refresh operations. In this PR, there's no way to set the flag yet.REFRESH TABLE
SQL command and corresponding handler. It takes effect for table withrefreshable
flag (so no way to use it in this PR).RefreshStart
(send byREFRESH TABLE
SQL) andLoadFinish
(will have a new mechanism to send it, introduced in the following PR.)Checklist