Now Storm SQL just converts Rex to code block and pass to Evaluation~ class so that each class can evaluate the code block in runtime.
This change made the code greatly simplified, but I expect that it is not same as performant as compiling and execute natively.
Linq4j in Calcite provides utility methods to make the code nicely. It's going to really really more verbose, but really better than having string concatenated code block since it doesn't have any guards.
So let's convert it back to code generation, but more elegant.