-
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
Fix the comparisions involving EMPTY. #5433
Changes from 2 commits
627c56f
c847ed0
f1f1c3b
32009f8
a99654f
3670d50
d13e36c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,6 +20,9 @@ folly::Future<Status> LoopExecutor::execute() { | |
QueryExpressionContext ctx(ectx_); | ||
|
||
auto value = expr->eval(ctx); | ||
if (value.isNull()) { | ||
value = Value(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. it seems that u should assign false to the value. maybe you need not to check the result of value, just delete the following DCHECK. 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. Removed. 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. It won't pass the tck. Reverted for now. It is an expression containing at least one |
||
} | ||
DCHECK(value.isBool()); | ||
finally_ = !(value.isBool() && value.getBool()); | ||
return finish(ResultBuilder().value(std::move(value)).iter(Iterator::Kind::kDefault).build()); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Copyright (c) 2023 vesoft inc. All rights reserved. | ||
# | ||
# This source code is licensed under Apache 2.0 License. | ||
Feature: Bug fixes with ngdata | ||
|
||
Background: | ||
Given a graph with space named "ngdata" | ||
|
||
Scenario: Comparing EMPTY values | ||
When executing query: | ||
""" | ||
MATCH (v0:Label_0)-[e0]->()-[e1*1..1]->(v1) | ||
WHERE (id(v0) == 11) AND (v1.Label_6.Label_6_400_Int == v1.Label_6.Label_6_500_Int) | ||
RETURN count(*) | ||
""" | ||
Then the result should be, in any order: | ||
| count(*) | | ||
| 0 | |
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 writing style is a bit strange. Could you replace it with the following?
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.
That would leave two extra conditions for normal non-empty cases. Changed to another form instead.