Hi,

I'd like to utilize Calcite to re-write SQL queries based on a few simple
(yet complex to implement) rules. My goal is to transform a logical plan,
and get back the SQL using RelToSqlConverter

 i.e:

in the following query:
SELECT name, Account.name from Contact

Account.name is a "parent-child" association of Contact table, and the
query has to be re-written as:

SELECT name, account.name from Contact
JOIN Account on account.id = contact.account_id

The issue i'm facing here is that the transformed LogicalProject node
doesn't pass the equivalence check due to the changed Project input.

I have more rules I'd like to apply - but they all tend to change the plan
in a way that the result will be the same, but the structure of the plan is
different.

Reply via email to