Skip to content
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 is null executor bug #3197

Merged
merged 1 commit into from
Apr 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/include/function/null/null_function_executor.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ struct NullOperationExecutor {
auto resultValues = (uint8_t*)result.getData();
if (operand.state->isFlat()) {
auto pos = operand.state->selVector->selectedPositions[0];
auto resultPos = result.state->selVector->selectedPositions[0];
FUNC::operation(
operand.getValue<uint8_t>(pos), (bool)operand.isNull(pos), resultValues[pos]);
operand.getValue<uint8_t>(pos), (bool)operand.isNull(pos), resultValues[resultPos]);
} else {
if (operand.state->selVector->isUnfiltered()) {
for (auto i = 0u; i < operand.state->selVector->selectedSize; i++) {
Expand Down
9 changes: 8 additions & 1 deletion test/test_files/tinysnb/function/null.test
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
-GROUP TinySnbReadTest
-DATASET CSV EMPTY
-DATASET CSV tinysnb

--

-CASE NullTest

-STATEMENT MATCH (a)-[:knows]->(b:person) WHERE a.ID = 2 RETURN a.ID, a.name, a.name IS NULL;
---- 3
2||True
2||True
2||True

-STATEMENT RETURN NULL IS NULL
---- 1
True
Expand Down
Loading