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): expose Vnode function as __rw_vnode for easy debugging #4327

Merged
merged 3 commits into from
Aug 1, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions e2e_test/batch/functions/internal.slt.part
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
statement ok
SET RW_IMPLICIT_FLUSH TO true;

statement ok
create table t(v1 varchar, v2 int, v3 int)

statement ok
select __rw_vnode(_row_id) as vnode, _row_id from t;

statement ok
insert into t values ('aaa', 1, 1), ('bbb', 0, 2), ('ccc', 0, 5), ('ddd', 1, 4)

statement ok
select __rw_vnode(_row_id) as vnode, _row_id from t;

statement ok
drop table t
1 change: 1 addition & 0 deletions src/frontend/src/binder/expr/function.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ impl Binder {
"current_database" if inputs.is_empty() => {
return Ok(ExprImpl::literal_varchar(self.db_name.clone()));
}
"__rw_vnode" => ExprType::Vnode,
_ => {
return Err(ErrorCode::NotImplemented(
format!("unsupported function: {:?}", function_name),
Expand Down