[ 
https://issues.apache.org/jira/browse/CALCITE-1733?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15951359#comment-15951359
 ] 

Julian Hyde commented on CALCITE-1733:
--------------------------------------

It depends on whether the functions/operators have their own special syntax:
* If the operators have their own syntax (as I suppose RLIKE does) then you 
will need to modify the parser, and you will either need to persuade the 
Calcite community to add it to the standard parser or you will need to create 
your own custom parser (not that difficult).
* If the operators have standard function syntax it's very straightforward. You 
don't need to modify the parser. You can just add them to the operator table at 
run time (one way is to add them to the model.json file but there are others).

> support more UDFs
> -----------------
>
>                 Key: CALCITE-1733
>                 URL: https://issues.apache.org/jira/browse/CALCITE-1733
>             Project: Calcite
>          Issue Type: New Feature
>          Components: core
>            Reporter: Xiaoyong Deng
>            Assignee: Julian Hyde
>
> Calcite has realized some functions, ReservedFunctionName listed in Parser.jj 
> for example. But there are many other functions, such as 'rlike'(matches the 
> Java regular expression), 'date_format'(Converts a date/timestamp/string to a 
> value of string in the format specified by the date format fmt) and do on.
> Yes, We can use {quote}
> void add(String name, Function function)
> {quote} in SchemaPlus to register new functions, but we are worried about 
> conflict with Calcite later. So, how can we do for this? Realize all 
> functions and submit to Calcite or just make these as our own functions?



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to