Hi, We are experimenting calcite in order to generate SQL out of RA algebra. So far it works quite well.
Now we want to construct some relatively complex SQL queries with CTEs using RelBuilder but we failed. We noticed that SQL queries with CTE can be correctly parsed by the SQLParser; however, after converting the SqlNode instance into a RelNode, it seems that the definition of CTEs are just expanded. We understood that this behavior might be due the there is no "spool" operator to generate CTE-style query plans to reuse RA expressions like the issue in [1]. Here, our need is a bit simpler. We only use Calcite to generate SQL queries out of some algebra. I am wondering if there are some subclasses of RelNode corresponding to "SqlWith" . More ideally, we would like to construct such queries from RelBuilder interface. After some study of the code base, if we understood correctly, it seems to us that such features are not available yet. Could you confirm this and suggest some alternatives? Thanks a lot! Best, Guohui & Elem [1] https://issues.apache.org/jira/browse/CALCITE-481 -- Guohui Xiao, PhD Assistant Professor with a fixed-term contract KRDB - Faculty of Computer Science Free University of Bozen-Bolzano Piazza Domenicani, 3 I-39100 Bolzano, Italy http://www.ghxiao.org
