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 <[email protected]> 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 <[email protected]> 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 <[email protected]> wrote:
>>> 
>>> 
>>> Is there a simple way to execute a RelJson directly on a CalciteConnection, 
>>> bypassing the SQL parsing stage?
>>> 
>> 
> 

Reply via email to