Some questions With code reading about Materialized Views

2022-02-08 Thread 徐保荣
hello, I'm reading code anout materialized views , This problems keeps making me puzzled. In the UnifyRule , what does SlotCount mean? can you give some examples? I look forward to hearing from you very much thanks rules transformation Permalink

Re: In over my head with advanced "RelBuilder" query building. Advice/thoughts appreciated

2022-02-08 Thread Gavin Ray
Sure, the SQL generated for that query is below As a side-note, it seems like "multisetQuery()" is close to being able to do this but it doesn't preserve the column names =( SELECT coalesce(json_agg("root"), '[]') AS "root" FROM ( SELECT row_to_json( ( SELECT

Re: In over my head with advanced "RelBuilder" query building. Advice/thoughts appreciated

2022-02-08 Thread James Starr
Could you translate it to SQL, I am not familiar with expression queries like that. On Tue, Feb 8, 2022 at 1:46 PM Gavin Ray wrote: > I am trying to work out the RelBuilder calls to make to generate > expressions for nested queries > > Given some query like this: > > query { > user(where: { id

In over my head with advanced "RelBuilder" query building. Advice/thoughts appreciated

2022-02-08 Thread Gavin Ray
I am trying to work out the RelBuilder calls to make to generate expressions for nested queries Given some query like this: query { user(where: { id: { _gt: 5 } }) { name todos { text } } } I need to return a single row, which is an array of JSON objects, like: [{ name: "P

Re: Prevent RexSimplify from simplifying operators to SEARCH

2022-02-08 Thread Julian Hyde
It is not possible today, but it is a reasonable feature request. One caveat. If conversion to SEARCH is disabled then many simplifications will not occur. Julian > On Feb 8, 2022, at 12:38 AM, Chathura wrote: > > Hello all, > > Can we configure RexSimplify to exclude certain operators such

Prevent RexSimplify from simplifying operators to SEARCH

2022-02-08 Thread Chathura
Hello all, Can we configure RexSimplify to exclude certain operators such as SEARCH? The requirement to prevent the builtin rules and custom rules from converting "t1.age>=1 AND t1.age<5" to AND(<=($0, 1), >($0, 5)) and then convert it to SEARCH during the RexSimplify#simplifyXX call. Regard

Some questions With code reading about Materialized Views

2022-02-08 Thread 徐保荣
hello, I'm reading code anout materialized views , up to now,I have accumulated a lot of problems ,These problems keeps making me puzzled. question1: what is the schema for query it‘s related materialized views(MaterializationService.query(CalciteSchema rootSchema)),I d

[jira] [Created] (CALCITE-5003) MergeUnion on types with different collators produces wrong result

2022-02-08 Thread Ruben Q L (Jira)
Ruben Q L created CALCITE-5003: -- Summary: MergeUnion on types with different collators produces wrong result Key: CALCITE-5003 URL: https://issues.apache.org/jira/browse/CALCITE-5003 Project: Calcite