-
Notifications
You must be signed in to change notification settings - Fork 85
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
Implement scalar macro #1836
Implement scalar macro #1836
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #1836 +/- ##
==========================================
- Coverage 91.19% 91.18% -0.02%
==========================================
Files 779 793 +14
Lines 28606 28856 +250
==========================================
+ Hits 26088 26311 +223
- Misses 2518 2545 +27
☔ View full report in Codecov by Sentry. |
src/include/planner/logical_plan/logical_operator/logical_create_macro.h
Outdated
Show resolved
Hide resolved
namespace kuzu { | ||
namespace parser { | ||
|
||
std::unique_ptr<ParsedExpression> ParsedExpressionVisitor::replaceMacroParameters( |
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 is not the exact way to write a visitor.
I think you want ParsedExpressionVisitor to only define getChildren()
interface because some expression, e.g. CASE
children are stored separately inside of children directly.
And you want an other class like ParsedExpressionParameterReplacor to implement such logic.
Implements scalar macro.
Scalar macro allows user to create a scalar function in the catalog.
Grammar to create a scalar macro:
CREATE MACRO MACRO_NAME(PARAM1, PARAM2 := defaultVal) AS MACRO_BODY