Re: [DISCUSS] New RexNode: RexListCmp

2020-07-19 Thread Enrico Olivelli
Il Lun 20 Lug 2020, 03:00 Haisheng Yuan ha scritto: > Hi all, > > This is a rough idea, I'd like to see how the community think about it. > > RexListCmp extends RexNode / RexCall { > public final SqlOperator op; > public final RexNode left; > public final ImmutableList list; > public

Re: Re: [DISCUSS] New Join Type: ANTI_NOTIN

2020-07-19 Thread Haisheng Yuan
I agree that NOT IN is toxic, and it is error-prone. But you can't prevent people writing SQL with not in sub-queries, would you rather let optimizer generate inefficient plan? - Haisheng -- 发件人:Julian Hyde 日 期:2020年07月20日 11:56:35

Re: [DISCUSS] New Join Type: ANTI_NOTIN

2020-07-19 Thread Julian Hyde
Yuck! NOT IN is toxic. I'd rather keep it out of the algebra. On Sun, Jul 19, 2020 at 8:24 PM Haisheng Yuan wrote: > > Hi all, > > Currently, JoinRelType.ANTI only represents NOT_EXISTS subquery (thanks to > Ruben for reminding). > For some simple boolean context NOT_IN subquery, we can't

Re: [DISCUSS] Towards Calcite 1.24.0

2020-07-19 Thread Chunwei Lei
Hi, all. Now I am preparing RC0. Best, Chunwei On Sat, Jul 18, 2020 at 2:44 AM Julian Hyde wrote: > It’s a difficult call. There’s kind of a time - functionality trade-off. > At some point it’s diminishing returns - waiting another day won’t > significantly improve the goodness of the

[DISCUSS] New Join Type: ANTI_NOTIN

2020-07-19 Thread Haisheng Yuan
Hi all, Currently, JoinRelType.ANTI only represents NOT_EXISTS subquery (thanks to Ruben for reminding). For some simple boolean context NOT_IN subquery, we can't transform it to ANTI join. e.g.: SELECT * FROM foo WHERE a NOT IN (SELECT b FROM bar); -- bar.b is nullable Because if there is a

[jira] [Created] (CALCITE-4132) Estimate the NDV accurately

2020-07-19 Thread Liya Fan (Jira)
Liya Fan created CALCITE-4132: - Summary: Estimate the NDV accurately Key: CALCITE-4132 URL: https://issues.apache.org/jira/browse/CALCITE-4132 Project: Calcite Issue Type: Improvement

[DISCUSS] New RexNode: RexListCmp

2020-07-19 Thread Haisheng Yuan
Hi all, This is a rough idea, I'd like to see how the community think about it. RexListCmp extends RexNode / RexCall { public final SqlOperator op; public final RexNode left; public final ImmutableList list; public final RexQuantifier quantifier; public final RelDataType type; } Enum