Read out intermediate result cardinalities
Hello!
This is a really cool project and I am currently digging into it. I have a question regarding true cardinalities of intermediate nodes in the QEP.
After some experiments that failed, I wanted to ask whether you can give me some hints or guidance on how I could best extract intermediate result cardinalities of my QEP. I already understood the logical query plan and how to extract and traverse the tree. I also know that the physical operator implementations are in the WasmOperator files. But I did not quiet grasp how I could attach and emit a counter to any of the join algorithms. I use a simple setup and it seems that I cannot tap into the backend execution itself during runtime.
My best guess would be to look at the LIMIT operator to try to copy the internal counter logic and somehow emit the counter.
I hope my request is understandable. :)
Thank you in advance!
This will require some work. Here's one possible approach. Allocate a global i64 in the Wasm module and add instructions to the operator to increment on row produced. I think this could be generalized by implementing this in some super class of all Wasm operators. In the long run, we could extend this to collect arbitrary operator metrics.