-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
enhance match attribute filter #3272
Conversation
Add test cases. |
b194389
to
3e85b59
Compare
5c9ce6c
to
9314898
Compare
| e | | ||
When executing query: | ||
""" | ||
match (v:player{age:"24"-1}) return v |
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 will report error in cypher.
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.
done
dc7e184
to
842bbb1
Compare
MapExpression* props() { return props_; } | ||
|
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.
Why delete const?
StatusOr<Expression *> MatchValidator::makeSubFilter(const std::string &alias, | ||
const MapExpression *map, | ||
const std::string &label) const { | ||
MapExpression *map, | ||
const std::string &label) { |
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.
Expressions related implementation changes should not change the Interface of the Validator.
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.
need to rewrite the expression after fold into the mapexpression
002cfc3
to
70099cd
Compare
|
||
Scenario: toInteger | ||
When executing query: | ||
""" | ||
YIELD [toInteger(true), toInteger(false), toInteger(1), toInteger(3.14), |
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.
Why change this case?
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.
toInteger(false), toInteger(true) will report error in opencypher, other modified cases too
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 think you should keep the origin case, and add new one to test the origin function.
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 know, but the result of origin case is wrong, and the modified logic test has been covered
Codecov Report
@@ Coverage Diff @@
## master #3272 +/- ##
==========================================
- Coverage 85.24% 85.23% -0.01%
==========================================
Files 1295 1295
Lines 118190 118210 +20
==========================================
+ Hits 100748 100762 +14
- Misses 17442 17448 +6
Continue to review full report at Codecov.
|
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. Please fix the conflicts.
660f3c6
to
f2d46e4
Compare
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
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. But, I have a small question. Is it reasonable to expose BAT_TYPE
to users? I haven't learned about GQL and opencypher. If they are like this, that's OK. But if they are not like this, is it necessary for us to standardize the null type
we return to user? After all, our Value
has many kinds of null type
.
Neither of them return |
All bad nulls is actually just an error with an error message. It may be more reasonable to provide a Value overload with customizable error messages, bcz current expressions’ ability to report and transmit errors is very limited. |
What type of PR is this?
enhancement
What does this PR do?
close #3270
Which issue(s)/PR(s) this PR relates to?
Special notes for your reviewer, ex. impact of this fix, etc:
Additional context:
Checklist:
Release notes: `