If you are doing adding filters / projects for the purposes of access control, 
you should consider creating views. Your users will write queries on the views 
and be transformed to queries on the base tables.

For other kinds of algebraic transforms — especially manipulations that 
preserve semantics — I suggest that you use planner rules as much as possible. 
There are a lot of existing rules, and they are well tested. You will be able 
to achieve a fair amount by manipulating expressions on FilterableTable but you 
will start seeing diminishing returns.

Hopefully that gives you an idea where to start.

Julian


> On Jan 25, 2017, at 10:40 AM, ravi katkar <[email protected]> wrote:
> 
> Hi Julian,
> 
> 
> i want to retrieve columns names in calcite adapter code so as to rewrite
> the select clause query. I want to add few sudo columns in select and
> rewrite the query for my requirement.
> e:g from FilterableTable type we can access the where clause filters and
> manipulate the filters, in similar line i want to access the select clause
> and rewrite the query.
> 
> Thanks,
> Ravi Katkar
> 
> On Wed, Jan 25, 2017 at 9:59 PM, Julian Hyde <[email protected]> wrote:
> 
>> Have you tried PreparedStatement.getMetaData()?
>> 
>>> On Jan 25, 2017, at 5:11 AM, ravi katkar <[email protected]>
>> wrote:
>>> 
>>> Hi list,
>>> 
>>> I am working on POC for our requirement, majorly relying on the CSV
>>> adapter.
>>> 
>>> I am looking way to retrieve the  columns from the select clause from the
>>> sql -query in csv adapter.
>>> 
>>> Eg: select firstname, lastname,dept from Employee where empid= 10;
>>> 
>>> i want to retrive  columns firstname, lastname, dept from the query.
>>> 
>>> Thanks,
>>> Ravi K
>> 
>> 

Reply via email to