Hi Ravi,

RelNodes depend on specific table objects with known schemas. Unless we
know that table's schema there is no way to generate the RelNode in the
first place. Maybe if you know the schema (data types of the table
columns), it is possible to get around the lack of a name, but I do not see
how this works if there is no table object or schema in the first place.

Thanks,
Walaa.


On Thu, May 2, 2024 at 10:23 PM Ravi Kapoor <kapoorrav...@gmail.com> wrote:

> Hello Team,
> Is there any way in the calcite framework to use runtime variables in Rel
> Node in order to get the same variable back in the translated query?
> Basically I want the same variable to be used back as the runtime parameter
> after query translation.
>
> Here I am talking specifically about using dynamic parameters in
> table/column identifiers and not dynamic rex nodes.
>
> Let's say in Teradata I can write below query
> *TD*:  select employee_id, TRIM(employee_name) from :*table_name*
>
> The translated sql should give back to me the same parameter in the query.
> *say Trim is mapped to LTRIM*
> *BigQuery*: select employee_id, LTRIM(employee_name) from :*table_name*
>
> I believe we can only have static values in schema plus to
> create tables/columns. But what about such cases?
> Need to handle this gracefully with no string manipulation.
>
> --
> Thanks,
> Ravi
>

Reply via email to