`sum` on (statically known) empty sequence fails
ingomueller-net opened this issue ยท 3 comments
ingomueller-net commented
On master, this is the current behaviour:
rumble$ sum(())
>>>
>>>
[ERROR] An error has occurred: Index: 0, Size: 0
We should investigate this ๐. Please contact us or file an issue on GitHub with your query.
Link: https://github.com/RumbleDB/rumble/issues
rumble$ let $empty := () return sum($empty)
>>>
>>>
[ERROR] An error has occurred: Index: 0, Size: 0
We should investigate this ๐. Please contact us or file an issue on GitHub with your query.
Link: https://github.com/RumbleDB/rumble/issues
rumble$ sum(1 to -1)
>>>
>>>
0
The query took 20 milliseconds to execute.
It looks like the call to sum
fails if the input is the statically known empty sequence (like in the first two examples). If an empty sequence is encountered dynamically, it seems to work.
ghislainfourny commented
Good catch, Ingo. Thank you.
ghislainfourny commented
ghislainfourny commented
@ingomueller-net do you agree if we close this issue?