Hi Ashutosh,
We have ever encountered a similar problem when we need to support 'fake'
Hive functions in Calcite and push it down.
Our approach is to use Object.class to define functions.
e.g.
public static class Dummy {
public String trim(Object arg) {
......
}
}
Best,
Feng
Ashutosh Marathe <[email protected]> 于2020年1月16日周四
上午4:06写道:
> Hi,
>
> This mail was requesting for help for the problem we are facing in apache
> calcite to have custom function support with different datatypes. We want
> to support same function name with different datatype (e.g. We want to have
> a trim function to be supported for int, float, String etc. datatypes).
> Currently we register the custom functions via making entry for custom
> functions in model.json. Currently by that approach, I can only add one
> entry for trim function and hence I can only use trim for one of the
> datatypes and not all. How can I achieve the requirement explained above in
> apache calcite. We are using apache calcite version 1.17.0.
>
> Thanking you in advance for the help.
>
> Awaiting a response on this query.
>
> Regards,
>
> Ashutosh Marathe
> ===========================================================================================================================================================================================
> DISCLAIMER: The information contained in this message (including any
> attachments) is confidential and may be privileged. If you have received it
> by mistake please notify the sender by return e-mail and permanently delete
> this message and any attachments from your system. Any dissemination, use,
> review, distribution, printing or copying of this message in whole or in
> part is strictly prohibited. Please note that e-mails are susceptible to
> change. CitiusTech shall not be liable for the improper or incomplete
> transmission of the information contained in this communication nor for any
> delay in its receipt or damage to your system. CitiusTech does not
> guarantee that the integrity of this communication has been maintained or
> that this communication is free of viruses, interceptions or interferences.
> ===========================================================================================================================================================================================
>