calcite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Maria <linanmengxia...@126.com>
Subject Re:Re: How to convert custom Class type to Expression Type?
Date Fri, 10 May 2019 09:13:37 GMT
Thankyou so much for your reply.Muhammad .


I find a solution: serializing my custom filter object to byte[], then call org.apache.calcite.linq4j.tree.Expressions.constant(),
it works!


At 2019-05-07 21:34:57, "Muhammad Gelbana" <m.gelbana@gmail.com> wrote:
>I think it might be easier/cleaner to have the filter as an input to a
>project having the expression processing the filter's output. I don't know
>if it's possible to have the operatr as an input to an expression.
>
>Thanks,
>Gelbana
>
>
>On Tue, May 7, 2019 at 1:09 PM Maria <linanmengxiaoai@126.com> wrote:
>
>> Hi, all.
>>    I have one custom type called 'x.xx.xxx.EsSqlFilter', and I want to
>> convert it to Expression type, then pass the instance obj  to a function
>> through Expressions.call(), then it can be used in the specified function
>> call,I tryed to use 'Expressions.newArrayInit(clazz, constantList(values))'
>> to convert it, but it became a new Object with nothing in the function, all
>> the attribute values are lost.
>>     I am newbie with linq4J. and got bogged down in this question.
>>    Can someone give me an suggestion? Any reply will be much appreciated.
>>
>>
>> Best Wishes.
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message