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
Some math functions return ±NaN instead of NULL. NaN is not serializable by GSON lib.
For example, LN uses Math.log which returns -NaN for negative values.
v -> newExprDoubleValue(Math.log(v.doubleValue()))),
How can one reproduce the bug?
opensearchsql> select LN(-12.34567);
{'reason': 'Invalid SQL query', 'details': 'NaN is not a valid double value as per JSON specification. To override this behavior, use GsonBuilder.serializeSpecialFloatingPointValues() method.', 'type': 'IllegalArgumentException'}
What is the bug?
Some math functions return
±NaN
instead ofNULL
.NaN
is not serializable by GSON lib.For example,
LN
usesMath.log
which returns-NaN
for negative values.sql/core/src/main/java/org/opensearch/sql/expression/operator/arthmetic/MathematicalFunction.java
Line 220 in 9d4a841
How can one reproduce the bug?
What is the expected behavior?
What is your host/environment?
main
@ 9d4a841Do you have any additional context?
Fix all math functions or patch serializer callee in
protocol
module to replace all±NaN
byNULL
s.The text was updated successfully, but these errors were encountered: