-
Notifications
You must be signed in to change notification settings - Fork 613
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(expr): introduce deprecated
to #[function]
macro
#11189
Conversation
Signed-off-by: Runji Wang <[email protected]>
Codecov Report
@@ Coverage Diff @@
## main #11189 +/- ##
==========================================
- Coverage 69.73% 69.72% -0.01%
==========================================
Files 1313 1313
Lines 224159 224165 +6
==========================================
- Hits 156307 156296 -11
- Misses 67852 67869 +17
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 4 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Thank you for the support! I was also thinking about updating the macro to mark a signature as "skip during frontend matching, or sqlsmith generation" Just some related thoughts,
|
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 we should be able to remove cardinality
and array_length
from infer_type_for_special
.
As mentioned above, deprecated signature should also be excluded from sqlsmith as in #11055
Rest LGTM. Thank you.
fn find_name(attr: &syn::AttributeArgs, name: &str) -> bool { | ||
attr.iter().any(|n| { | ||
let syn::NestedMeta::Meta(syn::Meta::Path(path)) = n else { return false }; | ||
path.is_ident(name) | ||
}) | ||
} |
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.
It seems a typo would make it ineffective silently #[xxx(.., nam)]
. How can we improve on this? Maybe warn on all unrecognized names?
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 that we use bae::FromAttributes
in the proc-macros of the common crate. Maybe we can borrow it from there.
Signed-off-by: Runji Wang <[email protected]>
Signed-off-by: Runji Wang <[email protected]>
Signed-off-by: Runji Wang <[email protected]>
Signed-off-by: Runji Wang <[email protected]>
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.
CI failure is due to slight change of error message.
Should I manage to keep the error message as before or modify the test script? Looks like |
I do not have a strong opinion on this. One is more general and one is more specific, and it is also more accurate to call it risingwave/src/frontend/src/expr/mod.rs Line 257 in 43b7273
|
Signed-off-by: Runji Wang <[email protected]>
I don't know how to change the code properly. So I just updated test script to let it pass. Maybe refine it later. |
I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.
What's changed and what's your intention?
This PR introduces
deprecated
attribute to#[function]
macro. Deprecated functions should not be used in the frontend, but for backward compatibility, they are still in the signature map and are available in the backend.Current deprecated functions:
With this feature, can we remove these cases from
infer_type_for_special
? @xiangjinwuChecklist
./risedev check
(or alias,./risedev c
)Documentation