Whether Explain statement should be validated or not

2021-05-13 Thread you Zhuang
Calcite doesn't treat Explain statement as DDL, so Explain statement isn't a top level statement and will not have any namespace. But Explain will experience validated and that cause NPE. Q1: If Explain statement should not be validated, will we throw a more user-friendly exception? Q2: If

count(if(a=1, 1, null)) syntax support

2021-02-20 Thread you Zhuang
when does calcite support count(if(a=1, 1, null)) syntax ? spark, hive, clickhouse, impala, presto support the syntax for a long time.

calcite variable $cor0 is not found

2021-02-08 Thread you Zhuang
String sql = "select id, name, (select id from test.users where id = b.id) as pid from test.depts b"; sqlToRelConverter.convertQuery(validatedSqlNode, false, true) i can get the following [main:DEBUG] org.apache.calcite.sql2rel: Plan after converting SqlNode to RelNode LogicalProject(ID=[$0],