Re: [ANNOUNCE] New committer: Xiong Duan

2021-10-25 Thread XING JIN
Congratulations !

Best,
Jin

Chunwei Lei  于2021年10月25日周一 下午4:58写道:

> Congratulations, Xiong!
>
>
> Best,
> Chunwei
>
>
> On Sun, Oct 24, 2021 at 6:34 AM Haisheng Yuan  wrote:
>
> > Congrats, Xiong!
> >
> > On 2021/10/23 21:23:59, Francis Chuang  wrote:
> > > Congratulations!
> > >
> > > On 24/10/2021 12:03 am, Stamatis Zampetakis wrote:
> > > > Apache Calcite's Project Management Committee (PMC) has invited Xiong
> > Duan
> > > > to
> > > > become a committer, and we are pleased to announce that they have
> > accepted.
> > > >
> > > > Xiong has pushed a lot of high quality patches, fixing and improving
> > code
> > > > around
> > > > aggregations and sub-queries,  in a rather short period of time.
> Apart
> > from
> > > > code
> > > > contributions, Xiong has been regularly reviewing PRs in GitHub and
> > helping
> > > > out
> > > > others in various JIRA issues.
> > > >
> > > > Xiong, welcome, thank you for your contributions, and we look forward
> > to
> > > > your
> > > > further interactions with the community! If you wish, please feel
> free
> > to
> > > > tell
> > > > us more about yourself and what you are working on.
> > > >
> > > > Stamatis (on behalf of the Apache Calcite PMC)
> > > >
> > >
> >
>


Re: Is there a mechanism for constant folding in Calcite?

2021-10-25 Thread Julian Hyde
Chunwei is correct.

If there are expressions that you would expect to constant-folded by that rule 
that aren’t, please log a bug.

> On Oct 25, 2021, at 7:10 PM, Chunwei Lei  wrote:
> 
> Hi, Ian.
> 
> ReduceExpressionsRule is always used to do constant folding.
> 
> 
> Best,
> Chunwei
> 
> 
> On Tue, Oct 26, 2021 at 4:34 AM Ian Bertolacci
>  wrote:
> 
>> Howdy,
>> Does Calcite have any mechanism for applying constant folding to RexNodes
>> in a query?
>> 
>> We’ve been wondering why expressions like `1 + 2` don’t get folded into
>> the constant `3`.
>> We’re aware of RexSimplify, but it only does constant folding for Boolean
>> expressions (i.e. logical and (some) comparison operations)
>> And even with RexSimplify, we find that it still does not perform some
>> (what we would consider trivial) optimizations on SEARCH expressions.
>> For example `SEARCH(123:BIGINT, Sarg[123L:BIGINT]:BIGINT)` should get
>> folded into `true`, but isn’t.
>> (But that’s a separate conversation).
>> 
>> So: is constant folding on all expressions something that already exists
>> in Calcite?
>> If so, what should we be looking at to configure Calcite to apply constant
>> folding?
>> 
>> Thanks!
>> -Ian J. Bertolacci
>> 



Re: Is there a mechanism for constant folding in Calcite?

2021-10-25 Thread Chunwei Lei
Hi, Ian.

ReduceExpressionsRule is always used to do constant folding.


Best,
Chunwei


On Tue, Oct 26, 2021 at 4:34 AM Ian Bertolacci
 wrote:

> Howdy,
> Does Calcite have any mechanism for applying constant folding to RexNodes
> in a query?
>
> We’ve been wondering why expressions like `1 + 2` don’t get folded into
> the constant `3`.
> We’re aware of RexSimplify, but it only does constant folding for Boolean
> expressions (i.e. logical and (some) comparison operations)
> And even with RexSimplify, we find that it still does not perform some
> (what we would consider trivial) optimizations on SEARCH expressions.
> For example `SEARCH(123:BIGINT, Sarg[123L:BIGINT]:BIGINT)` should get
> folded into `true`, but isn’t.
> (But that’s a separate conversation).
>
> So: is constant folding on all expressions something that already exists
> in Calcite?
> If so, what should we be looking at to configure Calcite to apply constant
> folding?
>
> Thanks!
> -Ian J. Bertolacci
>


Is there a mechanism for constant folding in Calcite?

2021-10-25 Thread Ian Bertolacci
Howdy,
Does Calcite have any mechanism for applying constant folding to RexNodes in a 
query?

We’ve been wondering why expressions like `1 + 2` don’t get folded into the 
constant `3`.
We’re aware of RexSimplify, but it only does constant folding for Boolean 
expressions (i.e. logical and (some) comparison operations)
And even with RexSimplify, we find that it still does not perform some (what we 
would consider trivial) optimizations on SEARCH expressions.
For example `SEARCH(123:BIGINT, Sarg[123L:BIGINT]:BIGINT)` should get folded 
into `true`, but isn’t.
(But that’s a separate conversation).

So: is constant folding on all expressions something that already exists in 
Calcite?
If so, what should we be looking at to configure Calcite to apply constant 
folding?

Thanks!
-Ian J. Bertolacci


Re: [ANNOUNCE] New committer: Xiong Duan

2021-10-25 Thread Chunwei Lei
Congratulations, Xiong!


Best,
Chunwei


On Sun, Oct 24, 2021 at 6:34 AM Haisheng Yuan  wrote:

> Congrats, Xiong!
>
> On 2021/10/23 21:23:59, Francis Chuang  wrote:
> > Congratulations!
> >
> > On 24/10/2021 12:03 am, Stamatis Zampetakis wrote:
> > > Apache Calcite's Project Management Committee (PMC) has invited Xiong
> Duan
> > > to
> > > become a committer, and we are pleased to announce that they have
> accepted.
> > >
> > > Xiong has pushed a lot of high quality patches, fixing and improving
> code
> > > around
> > > aggregations and sub-queries,  in a rather short period of time. Apart
> from
> > > code
> > > contributions, Xiong has been regularly reviewing PRs in GitHub and
> helping
> > > out
> > > others in various JIRA issues.
> > >
> > > Xiong, welcome, thank you for your contributions, and we look forward
> to
> > > your
> > > further interactions with the community! If you wish, please feel free
> to
> > > tell
> > > us more about yourself and what you are working on.
> > >
> > > Stamatis (on behalf of the Apache Calcite PMC)
> > >
> >
>


help review PR (ugrade to Cassandra 4 - CALCITE-4768)

2021-10-25 Thread Alessandro Solimando
Hello everyone,
if someone has spare cycles I'd appreciate some help merging this PR:
https://github.com/apache/calcite/pull/2592

This is the associated ticket:
https://issues.apache.org/jira/browse/CALCITE-4768

The PR adds Cassandra 4 support, and upgrades as well the DataStax driver
we use to the latest version.

Best regards,
Alessandro