Re: Serializing Relational Algebra to JSON

2021-06-08 Thread Alex Baden
Hi Lana, As Stamatis said, we use a custom RelWriter and the explain method on the rel nodes to dump the plan to JSON. It is the same few lines as here, but we've plucked them out of RelOptUtil into our own serializer class:

Pushing down aggregates through rhs of a left join

2020-07-30 Thread Alex Baden
Hi all, I have a query of the form: SELECT a.x, SUM(b.y), SUM(b.z) FROM t1 a LEFT JOIN t2 b ON a.join_key = b.join_key GROUP BY a.x ORDER BY a.x; If table b has a large number of duplicate keys for `join_key`, the left join can be very expensive to compute. Instead, we would like to run: WITH

[jira] [Created] (CALCITE-3973) Writing SQL hints to a string results in SQL that cannot be parsed

2020-05-05 Thread Alex Baden (Jira)
Alex Baden created CALCITE-3973: --- Summary: Writing SQL hints to a string results in SQL that cannot be parsed Key: CALCITE-3973 URL: https://issues.apache.org/jira/browse/CALCITE-3973 Project: Calcite