[QUESTION] Does SQL standard allows project nested fields for aggregate ?

2020-10-19 Thread Danny Chan
CREATE TYPE my_type AS ( a int , b VARCHAR(20)); create table t1(   f0 my_type,   f1 int,   f2 varchar(20) ); insert into t1 values((1, 'abc'), 2, ‘def’); SELECT f0.a, max(f1) FROM t1 GROUP BY f0; — this is invalid in PostgreSQL SELECT f0, max(f1) FROM t1 GROUP BY f0; — this is a valid query

[jira] [Created] (CALCITE-4346) strange result in toString function with bigdecimal type

2020-10-19 Thread Zhixiong Chen (Jira)
Zhixiong Chen created CALCITE-4346: -- Summary: strange result in toString function with bigdecimal type Key: CALCITE-4346 URL: https://issues.apache.org/jira/browse/CALCITE-4346 Project: Calcite

Re: why DECIMAL is in SqlTypeName#EXACT_TYPES but DOUBLE is in SqlTypeName#APPROX_TYPES

2020-10-19 Thread JiaTao Tao
Hi Julian I test a bit, Java/C/MySql/Spark/Hive/ support double/float mod, but pg seems not to support this. There's no oracle in my hand, so the oracle is not tested yet. Regards! Aron Tao Julian Hyde 于2020年10月20日周二 上午1:33写道: > Calcite aims to cover the SQL standard, but it is not limited to

Re: why DECIMAL is in SqlTypeName#EXACT_TYPES but DOUBLE is in SqlTypeName#APPROX_TYPES

2020-10-19 Thread Julian Hyde
Calcite aims to cover the SQL standard, but it is not limited to it. So, given that the MOD operator in the standard does not cover DOUBLE, the conversation should shift to which other DBs support it. Is there a consensus as to the semantics? Are there related features that we should do too? Juli

Re: why DECIMAL is in SqlTypeName#EXACT_TYPES but DOUBLE is in SqlTypeName#APPROX_TYPES

2020-10-19 Thread Alessandro Solimando
Hello Aron, sorry I forgot to cover the part regarding the modulo operation. Calcite again follows the standard on that respect, and the SQL standard says: operates on two exact numeric arguments with scale 0 > (zero) and returns > the modulus (remainder) of the first argument divided by the sec

Re: [DISCUSS] Apache Calcite Online Meetup January 2021

2020-10-19 Thread Andrii Tsvielodub
That's a good idea! I believe a presentation on recent improvements/significant changes/refactorings would be very interesting and useful to everyone here. E.g. changes to planner, refactorings of join algorithms, improvements to execution layer. I bet many of those topics have interesting details

Re: [DISCUSS] Apache Calcite Online Meetup January 2021

2020-10-19 Thread Ruben Q L
I think it is a great idea! Best, Ruben On Sun, Oct 18, 2020 at 9:01 AM guangyuan wang wrote: > I'm a newcomer, I am looking forward to attending the online meetup. > > Chunwei Lei 于2020年10月16日周五 下午1:46写道: > > > It would be great! I am glad to attend such a meetup. > > > > > > Best, > > Chunw

[jira] [Created] (CALCITE-4345) SUM CASE WHEN without else throws NPE

2020-10-19 Thread Jiatao Tao (Jira)
Jiatao Tao created CALCITE-4345: --- Summary: SUM CASE WHEN without else throws NPE Key: CALCITE-4345 URL: https://issues.apache.org/jira/browse/CALCITE-4345 Project: Calcite Issue Type: Bug