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
Have you tried reproducing the issue with latest release?
It worked with 1.0.9 but bugs with 1.0.10
What is the hardware spec (RAM, OS)?
Linux Debian Testing, 16GoDDR
Steps to reproduce the issue (command/config used to run Dgraph).
In a query, I do a division and protect potential 0 value for the divisor with a 'max' function.
The error only happens with value variables, it works with numeric values.
I also tried to protect the division with a 'cond' without success.
Here is my query:
{
var(func: uid("0xea61")) {
ct_thinks as count(thinks)
knows {
ct_knows as math(1)
}
sum_knows as sum(val(ct_knows))
}
me(func: uid("0xea61")) {
avg: math(ct_thinks / max(1, sum_knows))
}
}
Expected behaviour and actual result.
If sum_knows equals to 0 then avg should be 0.
If I replace ct_thinks with a literal value, then no more bug.
The text was updated successfully, but these errors were encountered:
What version of Dgraph are you using?
1.0.10
Have you tried reproducing the issue with latest release?
It worked with 1.0.9 but bugs with 1.0.10
What is the hardware spec (RAM, OS)?
Linux Debian Testing, 16GoDDR
Steps to reproduce the issue (command/config used to run Dgraph).
In a query, I do a division and protect potential 0 value for the divisor with a 'max' function.
The error only happens with value variables, it works with numeric values.
I also tried to protect the division with a 'cond' without success.
Here is my query:
If sum_knows equals to 0 then avg should be 0.
If I replace ct_thinks with a literal value, then no more bug.
The text was updated successfully, but these errors were encountered: