Hi Walaa,
Adding onto the last mail:

1) I already have the value of *table_name* parameter with schema and table
object to help calcite resolving it while creating RelNode.
    Is there any way to pass this? But In the translated query the value
should be replaced with the key itself.

Or Do we always need to pass this in the sql query as in the static query
itself?

On Fri, May 3, 2024 at 11:04 AM Walaa Eldin Moustafa <wa.moust...@gmail.com>
wrote:

> 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
> >
>


-- 
Thanks,
Ravi Kapoor
+91-9818764564
kapoorrav...@gmail.com

Reply via email to