DDL support issues in Calcite

2022-02-21 Thread wang...@mchz.com.cn
Dear Calcite community: I am new Calcite user here. I noted in the document https://calcite.apache.org/docs/adapter.html that Calcite does support DDL operations,the only thing I need to do is 1) to include calcite-server.jar in my classpath and 2) add parserFactory=org.apache.calcite.sql.pars

[jira] [Created] (CALCITE-5017) SqlTypeUtil#canCastFrom is hard to extend for downstream projects

2022-02-21 Thread Francesco Guardiani (Jira)
Francesco Guardiani created CALCITE-5017: Summary: SqlTypeUtil#canCastFrom is hard to extend for downstream projects Key: CALCITE-5017 URL: https://issues.apache.org/jira/browse/CALCITE-5017 P

Re: [HELP][DISCUSS] ReduceExpressionsRule configurability / extensibility

2022-02-21 Thread Ruben Q L
Thanks Stamatis, I will take a look at those links. On Fri, Feb 18, 2022 at 9:41 PM Stamatis Zampetakis wrote: > Hi Ruben, > > There was a recent request about preventing simplifications of certain > operators [1] that does make sense in certain use cases. Apart from changes > in RexSimplify th

[jira] [Created] (CALCITE-5018) org.apache.calcite.sql.parser.SqlParseException: Lexical error at line 1, column 8. Encountered: "`" (96), after : ""

2022-02-21 Thread zhangquan (Jira)
zhangquan created CALCITE-5018: -- Summary: org.apache.calcite.sql.parser.SqlParseException: Lexical error at line 1, column 8. Encountered: "`" (96), after : "" Key: CALCITE-5018 URL: https://issues.apache.org/jira/b

Support Left out join in RelMdExpressionLineage

2022-02-21 Thread Chang Chen
Hi jesusca I am investigating how to extend MaterializedViewRule to support left outer join. The first issue which I met is supporting outer join in RelMdExpressionLineage#getExpressionLineage() I think the current implementation also fits in the outer join case, and to support outer join only ne

Re: "Unable to implement EnumerableNestedLoopJoin in SELECT(a, b, ARRAY(c, d, ARRAY(e)))"

2022-02-21 Thread Stamatis Zampetakis
Hey Gavin, I think you are bumping into a missing feature and most likely addressed by [1]. The approach in [1] is rather good but I had some doubts about a few new APIs that were introduced which made me a bit cautious about merging this to master. I would definitely like to find some time to re

Re: Why are nested aggregations illegal? Best alternatives?

2022-02-21 Thread Stamatis Zampetakis
Hi Gavin, A few more comments in case they help to get you a bit further on your work. The need to return the result as a single object is a common problem in object relational mapping (ORM) frameworks/APIS (JPA, Datanucleus, Hibernate, etc.). Apart from the suggestions so far maybe you could loo

Re: "Unable to implement EnumerableNestedLoopJoin in SELECT(a, b, ARRAY(c, d, ARRAY(e)))"

2022-02-21 Thread Gavin Ray
Ahh wow, thank you Stamatis. Great to know there is something that has been done in the past I suppose I could try to build from this PR and see if it works And about the API's, I assume you mean the "GenerateCorrelate" and "CreateEnricher" methods the author introduced there On Mon, Feb 21, 2022

Re: Why are nested aggregations illegal? Best alternatives?

2022-02-21 Thread Gavin Ray
I hadn't thought about the fact that ORM's probably have to solve this problem as well That is a great suggestion, I will try to investigate some of the popular ORM codebases and see if there are any tricks they are using. I seem to maybe be getting a tiny bit closer by using subqueries like Julia

RE: DDL support issues in Calcite

2022-02-21 Thread 徐仁和
Hi Wang The test case of `org.apache.calcite.test.ServerTest` may be what you want. On 2022/02/21 08:17:55 "wang...@mchz.com.cn" wrote: > Dear Calcite community: > > I am new Calcite user here. I noted in the document https://calcite.apache.org/docs/adapter.html that Calcite does support DDL opera

Re: dynamic reflective schema

2022-02-21 Thread xiaobo
I have made a customed JSONSchema on github : https://github.com/guxiaobo/calcite-json-adapter, I am still debug it, a simple example failed regarding getting the datatype of tables: Map> map = new HashMap>(); List t1 = new ArrayList(); JSONObject r1 = new JSONObj

Re: dynamic reflective schema

2022-02-21 Thread xiaobo
It seems because the public RelDataType getRowType(RelDataTypeFactory typeFactory) method of our JsonTable class did not have a change to be called. -- Original -- From: "xiaobo ";; Send time: Tuesday, Feb 22, 2022 2:57 PM To: "dev"; Subject: Re: dynamic r