Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
7.7.1
-
None
-
None
Description
Background
An easy way to experiment with Streaming Expressions is to define a tuple or list of tuples as a stream source and apply decorators\evaluators to this source. However, at the moment there is no easy way to define numeric values in a tuple because everything is being treated as a string.
Steps to Reproduce
Evaluate the following streaming expression:
tuple(int=13, float=42.42, string=foo, quoted_string="bar")
Actual Result:
"docs": [ { "int": "13", "float": "42.42", "string": "foo", "quoted_string": "bar" }, ... ]
Expected Result:
"docs": [ { "int": 13, "float": 42.42, "string": "foo", "quoted_string": "bar" }, ... ]
Possible Workarounds
It's possible to get the desired result by applying val() function to each numeric value, but it's not convenient:
tuple(int=val(13), float=val(42.42))