This might help: https://github.com/apache/calcite/blob/e08ca8c5df5dee154ae1a1e6adfa2f9ce693ccf7/core/src/test/java/org/apache/calcite/plan/RelWriterTest.java#L570-L595
And it's JSON + text representations: https://github.com/apache/calcite/blob/e08ca8c5df5dee154ae1a1e6adfa2f9ce693ccf7/core/src/test/java/org/apache/calcite/plan/RelWriterTest.java#L259-L377 https://github.com/apache/calcite/blob/e08ca8c5df5dee154ae1a1e6adfa2f9ce693ccf7/core/src/test/java/org/apache/calcite/plan/RelWriterTest.java#L677-L682 On Wed, Apr 20, 2022 at 3:27 PM Miguel Hernández Sandoval < [email protected]> wrote: > Hi everyone, > I'm currently working on a converter from a ZetaSQL AST to a CalciteSQL > Relational Operator Tree as part of a BeamSQL feature for Apache Beam. > > Right now, I'm trying to build a Relational Operator Tree that represents a > window function (e.g. "*select SUM(a) over(), COUNT(b) over() From T*"). > I've read this document[1] where it is explained how relational operators > work in Calcite but it doesn't contain more details about Window or > LogicalWindow. > It could be useful to know what a tree of this kind of function should look > like in order to choose an approach. > > Could you give me some pointers on how to create a Relational Operator Tree > that maps to a window function? > Is there any other documentation you suggest? > > Thank you all for your help. > > [1] > https://www.querifylabs.com/blog/relational-operators-in-apache-calcite > > -- > > Miguel Hernández Sandoval | WIZELINE > > Software Engineer > > [email protected] > > Amado Nervo 2200, Esfera P6, Col. Jardines del Sol, 45050 Zapopan, Jal. > > -- > *This email and its contents (including any attachments) are being sent to > you on the condition of confidentiality and may be protected by legal > privilege. Access to this email by anyone other than the intended recipient > is unauthorized. If you are not the intended recipient, please immediately > notify the sender by replying to this message and delete the material > immediately from your system. Any further use, dissemination, distribution > or reproduction of this email is strictly prohibited. Further, no > representation is made with respect to any content contained in this > email.* >
