Re: Stored Proc to Relational Expression

2020-04-23 Thread Julian Hyde
Stamatis, you are correct. The goal of LINQ and Linq4j is to allow SQL-like expressions in procedural code, not to translate the procedural code into a different language. Linq4j is not under active development (although it part of Calcite, and we use it, and enhance it when necessary) so Linq4j

Re: Stored Proc to Relational Expression

2020-04-22 Thread Stamatis Zampetakis
I assume that by GitHub page you mean [1]. For quite some time linq4j is part of calcite [2] so I think that [1] is not maintained anymore. The backlog in [1] also looks a bit obsolete. Julian can correct me if I am wrong. In my previous email, I was talking about relational expressions (i.e.,

Re: Stored Proc to Relational Expression

2020-04-22 Thread Ravi Kapoor
Yeah Stamatis, I know that as I can see the github page for linq4j that lots of task is in Backlog and Link-To-SQL Provider is one of them But the intention of the project is to make java objects as Queryable talk to DB. Expressions and various Statement used in linq4j is to generate the

Re: Stored Proc to Relational Expression

2020-04-21 Thread Stamatis Zampetakis
Hi Ravi, As Julian already mentioned, we are quite far from what you would like to achieve. Nevertheless, I would like to mention that you can model certain kind of loops and recursion using the RepeatUnion [1] and Spool [2] relational expressions. Note that these APIs are experimental.

Re: Stored Proc to Relational Expression

2020-04-20 Thread Julian Hyde
Calcite relational expressions can represent SELECT, INSERT etc. but not procedural code. It’s a direction we could consider going. RexProgram is the closest thing we currently have to procedural code in the algebra - single assignment of variables, use of variables in expressions assigning to

Stored Proc to Relational Expression

2020-04-19 Thread Ravi Kapoor
Hi Team, I have my use where I need to convert my dialect specific stored procedure constructs like while loop, If then else to Rel expression Basically this can contain control flow statements like below DECLARE heads BOOL; DECLARE heads_count INT64 DEFAULT 0; LOOP SET heads = RAND() < 0.5;