You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you define an aggregate table using WHERE something IS NONE, it works fine unless you try to UPDATE a property that was previously NOT NONE to a NONE property. So, it looks like the WHERE clause is not applied or is applied at the wrong place in the logic. I have prepared a short script to reproduce this.
Steps to reproduce
REMOVE TABLE wallet;
REMOVE TABLE wallet_mean;
UPDATE wallet:1 CONTENT {
value: 10,
day: 1,
};
UPDATE wallet:4 CONTENT {
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,
};
UPDATE wallet:10 CONTENT {
day: 1,
};
ioannist
changed the title
Bug: "Cannot perform addition with '24' and 'NONE'"
Bug: UPDATE does not respect WHERE is NOT NONE in Aggregate Table when Old Record IS NOT NONE
Apr 30, 2024
Describe the bug
If you define an aggregate table using WHERE something IS NONE, it works fine unless you try to UPDATE a property that was previously NOT NONE to a NONE property. So, it looks like the WHERE clause is not applied or is applied at the wrong place in the logic. I have prepared a short script to reproduce this.
Steps to reproduce
OUTPUT:
Expected behaviour
The UPDATE should execute without errors because the aggregate view has a WHERE value IS NOT NONE clause.
SurrealDB version
v1.4.2
Contact Details
No response
Is there an existing issue for this?
Code of Conduct
The text was updated successfully, but these errors were encountered: