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

Bug: Trying to DELETE record causes "Cannot perform addition..." in Aggregate Table #3968

Open
2 tasks done
ioannist opened this issue Apr 30, 2024 · 1 comment
Open
2 tasks done
Assignees
Labels
bug Something isn't working

Comments

@ioannist
Copy link

ioannist commented Apr 30, 2024

Describe the bug

When trying to DELETE a record, I get an error coming from an aggregate table.

Note that this happens only when we include "WHERE value is NOT NONE" in the aggregate table.

Steps to reproduce

REMOVE TABLE wallet;
REMOVE TABLE wallet_mean;

UPDATE wallet:1 CONTENT {
    value: 10,
    day: 1,
};


DEFINE TABLE IF NOT EXISTS wallet_mean AS SELECT
math::mean(value) as value, day FROM wallet WHERE value is NOT NONE GROUP BY day;

UPDATE wallet:10 CONTENT {
    value: 10,
    day: 1,
};

DELETE wallet:10;

OUTPUT:

-------- Query 1 (647.034µs) --------

NONE

-------- Query 2 (398.166µs) --------

NONE

-------- Query 3 (751.933µs) --------

[
	{
		day: 1,
		id: wallet:1,
		value: 10
	}
]

-------- Query 4 (724.744µs) --------

NONE

-------- Query 5 (313.357µs) --------

[
	{
		day: 1,
		id: wallet:10,
		value: 10
	}
]

-------- Query 6 (131.919µs) --------

"Cannot perform addition with '20' and 'NONE'"

Expected behaviour

There should be no error.

SurrealDB version

v1.4.2

Contact Details

No response

Is there an existing issue for this?

  • I have searched the existing issues

Code of Conduct

  • I agree to follow this project's Code of Conduct
@ioannist ioannist added bug Something isn't working triage This issue is new labels Apr 30, 2024
@ioannist
Copy link
Author

Might be related to #3966

@emmanuel-keller emmanuel-keller self-assigned this May 3, 2024
@emmanuel-keller emmanuel-keller removed the triage This issue is new label May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants