Ruben,
The next time the case reproduces, please collect the core dump.
At least you would be able to analyze it later.
It might be a VM issue (e.g. failing compilation), or it might be a
concurrency issue (e.g. data race in the parser code),
or something completely different.
You might find [1]
Hello,
in a downstream project we have experienced a strange phenomenon around
Calcite SQL parser.
To sum up, while running (sequentially) several thousand times (around 20K)
different instances of the "same" query (not sure if the query itself is
relevant, but just in case I share how it looks li