calcite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Julian Hyde <jh...@apache.org>
Subject Re: Executing a RelJson directly
Date Wed, 05 Aug 2015 22:58:39 GMT
Or… write a user-defined table function “jsonPlan”. It takes a varchar argument (the
json plan) and expands to the plan. Then use “select * from (table jsonPlan(‘xxx’)”.
The nice thing about that is that all the magic happens server side, and you don’t need
to change the JDBC framework.

Julian

> On Aug 5, 2015, at 3:52 PM, Marc Prud'hommeaux <marc@glimpse.io> wrote:
> 
> 
> That would explain why I couldn't figure out how to do it.
> 
> For the project I'm working on, I want to be able to serialize RelJson to .json files
and then re-execute them later in a web microservices framework. It occurs to me that the
Avatica server does 90% of what I want. Is it plausible that a "rel" JSON property might be
queried in org.apache.calcite.avatica.Meta and used to execute the query (preempting the "sql"
JSON property)? If the idea is sound, I may take a stab at implementing it.
> 
> Bonus question: has anyone considered creating a JSON Schema definition for the RelJson
and ModelHandler JSON formats? It could come in handy for people who want to implement an
Avatica client in another language.
> 
> 
>> On Aug 5, 2015, at 5:27 PM, Julian Hyde <jhyde@apache.org> wrote:
>> 
>> I don’t think there is — but I always hoped to create one.
>> 
>> 
>>> On Aug 5, 2015, at 2:21 PM, Marc Prud'hommeaux <marc@glimpse.io> wrote:
>>> 
>>> 
>>> Is there a simple way to execute a RelJson directly on a CalciteConnection, bypassing
the SQL parsing stage?
>>> 
>> 
> 


Mime
View raw message