calcite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Maria <>
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" <> 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.
>On Tue, May 7, 2019 at 1:09 PM Maria <> wrote:
>> Hi, all.
>>    I have one custom type called '', and I want to
>> convert it to Expression type, then pass the instance obj  to a function
>> through, 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.
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message