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
Mathematical order of precedence is not being followed for APPLY equations with exponentiation. Parentheses are necessary to ensure exponentiation has higher precedence. Redis Search version = 2.8.12
Examples:
Incorrect
> FT.AGGREGATE txns * APPLY '(2*3^2)' AS Value LIMIT 0 1
1) "1"
2) 1) "Value"
2) "36"
Correct
> FT.AGGREGATE txns * APPLY '(2*(3^2))' AS Value LIMIT 0 1
1) "1"
2) 1) "Value"
2) "18"
The text was updated successfully, but these errors were encountered:
Hi @joeywhelan
This indeed seems like a bug. Thanks for reporting.
joeywhelan
changed the title
Order of precedence not honored in APPLY functions with exponents [BUG]
[BUG] Order of precedence not honored in APPLY functions with exponents
Apr 3, 2024
Mathematical order of precedence is not being followed for APPLY equations with exponentiation. Parentheses are necessary to ensure exponentiation has higher precedence. Redis Search version = 2.8.12
Examples:
The text was updated successfully, but these errors were encountered: