> I'm curious to hear more about this
I think the [FoundationDB layer concept][1] said it well:
"When you choose a database today, you’re not choosing one piece of technology, you’re choosing three: storage technology, data model, and API/query language..."
I like the idea of [Apache Calcite][2] that provides an API to access the query planner. I think if you had more convenient access to some of the underlying components you could build a lot of cool stuff. There's too much magic where you punch in an SQL command or a config and hope it eventually does what you need.
I haven't look too much into the internals, but I'm keen to do so soon.
[1]: https://apple.github.io/foundationdb/layer-concept.html
[2]: https://calcite.apache.org/