-
Notifications
You must be signed in to change notification settings - Fork 595
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
refactor(expr): allow defining functions in frontend #12287
Changes from 1 commit
53b7636
06f81be
903131d
756da85
a021d63
a53a0d0
dc18a24
e36dff3
a069157
0b8fbb8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,6 +24,7 @@ auto_enums = { version = "0.8", features = ["futures03"] } | |
bk-tree = "0.5.0" | ||
bytes = "1" | ||
clap = { version = "4", features = ["derive"] } | ||
ctor = "0.2" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How about re-exporting |
||
downcast-rs = "1.2" | ||
dyn-clone = "1.0.13" | ||
easy-ext = "1" | ||
|
@@ -54,6 +55,7 @@ risingwave_common = { workspace = true } | |
risingwave_common_service = { workspace = true } | ||
risingwave_connector = { workspace = true } | ||
risingwave_expr = { workspace = true } | ||
risingwave_expr_macro = { workspace = true } | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We can re-export these macros from the expr crate so that we don't need to depend on the macro crate. (like There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No idea how to do that, we've already made There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We can remove that empty module now to avoid name conflict. 🤣 |
||
risingwave_pb = { workspace = true } | ||
risingwave_rpc_client = { workspace = true } | ||
risingwave_source = { workspace = true } | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
use std::fmt::Write; | ||
TennyZhuang marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
use risingwave_expr::ExprError; | ||
use risingwave_expr_macro::function; | ||
|
||
#[function("col_description(varchar, int32) -> varchar")] | ||
fn col_description(_name: &str, _col: i32, writer: &mut impl Write) -> Result<(), ExprError> { | ||
writer.write_str("").unwrap(); | ||
TennyZhuang marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
Ok(()) | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
mod col_description; | ||
TennyZhuang marked this conversation as resolved.
Show resolved
Hide resolved
|
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.
Today I learned. 🤯