There’s no straightforward answer but the different parts of Calcite have the 
thread safety you’d expect.

For instance, as Vladimir says, the JDBC driver is not thread safe - or more 
specifically, two threads cannot access the same connection at the same time 
(except the cancel method) - and this is what you’d expect because that’s what 
the JDBC spec says.

The process of preparing a statement (including parsing and planning) is not 
thread safe. Only one thread can be working on the statement state, and so 
structures used during preparation (e.g. VolcanoPlanner) are not thread safe.

But data structures that are shared among connections are (we believe) 
thread-safe. 

We run the test suite in parallel mode and that gives us confidence that the 
things that need to be thread safe are safe.

Julian

Reply via email to