Can you give me a nudge in the right direction for getting a RelNode to execute as a query?
I figure it must be possible, since that seems to be the motive behind the recent RelBuilder
addition. I'm guessing there is some step to convert the RelNode into a QueryProvider Expression,
but I'm stuck figuring out where that happens.
> On Aug 5, 2015, at 6:58 PM, Julian Hyde <jhyde@apache.org> wrote:
>
> 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?
>>>>
>>>
>>
>
|