drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sudheesh Katkam <skat...@maprtech.com>
Subject Re: Invoking UDF that doesn't have parameters without paranthesis
Date Tue, 20 Dec 2016 18:51:14 GMT
I do not know the exact answer.

Quite likely the Calcite parser needs to be changed, this blob:

https://github.com/apache/calcite/blob/master/core/src/main/codegen/templates/Parser.jj#L4765
<https://github.com/apache/calcite/blob/master/core/src/main/codegen/templates/Parser.jj#L4765>

Drill extends the Calcite parser, not sure if the change can be made here:

https://github.com/apache/drill/blob/master/exec/java-exec/src/main/codegen/includes/parserImpls.ftl
<https://github.com/apache/drill/blob/master/exec/java-exec/src/main/codegen/includes/parserImpls.ftl>

Thank you,
Sudheesh

> On Dec 19, 2016, at 3:00 PM, Nagarajan Chinnasamy <nagarajanchinnasamy@gmail.com>
wrote:
> 
> Hi Julian Hyde,
> 
> Thanks for your response. I am looking for the Drill way of doing it.
> 
> In fact I have coded session_id function exactly as one of other
> ContextFunctions of Drill. I seem to be missing something :(
> 
> 
> 
> 
> Best Regards,
> Nagu.
> 
> On Mon, Dec 19, 2016 at 1:30 PM, Nagarajan Chinnasamy <
> nagarajanchinnasamy@gmail.com> wrote:
> 
>> Hi,
>> 
>> Am developing a UDF called SESSION_ID as detailed in issue:
>> 
>>    https://issues.apache.org/jira/browse/DRILL-5043
>> 
>> It does not take any input parameters. Now, I can only invoke it using
>> parenthesis as in:
>> 
>>    SELECT SESSION_ID() FROM (Values(1));
>> 
>> I would like to know what do I need to do if I need to invoke it without
>> paranthesis like:
>> 
>>    SELECT SESSION_ID FROM (Values(1));
>> 
>> Appreciate your input.
>> 
>> Best Regards,
>> Nagu.
>> 


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message