RumbleDB/rumble

`sum` on (statically known) empty sequence fails

ingomueller-net opened this issue ยท 3 comments

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.

Good catch, Ingo. Thank you.

Screenshot 2021-05-18 at 15 55 18

Actually I cannot reproduce, Ingo. Are you sure you used the master?

@ingomueller-net do you agree if we close this issue?