[jira] [Created] (CALCITE-6321) Add copy(List constants) method to Window class.

2024-03-11 Thread Thomas D'Silva (Jira)
Thomas D'Silva created CALCITE-6321: --- Summary: Add copy(List constants) method to Window class. Key: CALCITE-6321 URL: https://issues.apache.org/jira/browse/CALCITE-6321 Project: Calcite

Re: Calcite with index seek

2022-10-31 Thread Thomas D'Silva
The cassandra adapter registers materialized views[1] which can be used to register an index. The MaterializedViewFilterScanRule might be helpful in getting the index to be chosen. [1]

Re: Re: JDBC and Hint Strategies

2022-10-18 Thread Thomas D'Silva
Dennis, Looking at the code I think the SQL2REL_CONVERTER_CONFIG_BUILDER hook might be the best way to add hints for use via sql. Even though the documentation says hooks should be used for debugging/testing I think practically they are needed to accomplish tasks from adapters for eg the

Re: JDBC and Hint Strategies

2022-10-12 Thread Thomas D'Silva
The HintStrategyTable can be defined in your adapter code for eg see https://github.com/twilio/calcite-kudu/blob/84c13e80f7cff83f3acaf5be4fc312c977e18ee8/adapter/src/main/java/com/twilio/kudu/sql/KuduQuery.java#L88 -Thomas On Fri, Oct 7, 2022 at 11:40 AM <42-0...@arcor.de.invalid> wrote: >

[REVIEW REQUEST] CALCITE-5240 (MaterializedViewRule enhancement)

2022-08-24 Thread Thomas D'Silva
Hi, I would like to request a review for CALCITE-5240, it modifies MaterializedViewRule so that views that do a rollup (for eg a group by on a datetime column floored to day) can be used when a query contains a range predicate on the same column. At my company we used calcite to develop a query

[jira] [Created] (CALCITE-5240) Enhance MaterializedViewRule so that it applies to rollup view for queries that contain a predicate on the rollup column

2022-08-17 Thread Thomas D'Silva (Jira)
Thomas D'Silva created CALCITE-5240: --- Summary: Enhance MaterializedViewRule so that it applies to rollup view for queries that contain a predicate on the rollup column Key: CALCITE-5240 URL: https

Contributor role request

2022-02-11 Thread Thomas D'Silva
Hi. I would like to contribute to the calcite project, could you please grant me the contributor role? My Apache JIRA login is tdsilva. Thank you, Thomas D'Silva

[jira] [Created] (CALCITE-5010) Modify RexBuilder to use convertlets to transform the RexCall when possible

2022-02-11 Thread Thomas D'Silva (Jira)
Thomas D'Silva created CALCITE-5010: --- Summary: Modify RexBuilder to use convertlets to transform the RexCall when possible Key: CALCITE-5010 URL: https://issues.apache.org/jira/browse/CALCITE-5010

Re: MaterializedViewRule is not applied for queries on aggregate views that truncate timestamp

2022-02-02 Thread Thomas D'Silva
rforming the view rewriting what you > should do is introduce other use-case specific rules that can be applied to > the input queries and bring them to the desired form. > > Best, > Stamatis > > On Fri, Jan 28, 2022 at 10:12 PM Thomas D'Silva > > wrote: > > > Xure

Using TIMESTAMPDIFF() with RelBuilder

2022-02-02 Thread Thomas D'Silva
Hi, I get an error while using TIMESTAMPDIFF with RelBuilder. For this example code @Test void testRun2() throws Exception { // Equivalent SQL: // SELECT TIMESTAMP(SECOND, HIREDATE, TIMESTAMP'1970-01-01') FROM EMP final RelBuilder builder = RelBuilder.create(config().build());

Re: MaterializedViewRule is not applied for queries on aggregate views that truncate timestamp

2022-01-28 Thread Thomas D'Silva
k2uAXFQiMSX-aQjnkJ6KLrXwXJX-VbsbE/edit*heading=h.ww6moavc8lkj__;Iw!!NCc8flgU!Lx31-Z0cEnGqJQwX-7zk1Kk3NvAaCblUwfyTg4jDUg0Y69SULj4jHJKPGC2W58A$ > My team has defined more `UnifyRule`s to solve it, > because SubstitutionVisitor has high-scalability. > > > Xurenhe > > Thomas D'Silv

Re: MaterializedViewRule is not applied for queries on aggregate views that truncate timestamp

2022-01-27 Thread Thomas D'Silva
: > Hey Thomas, > > Can you post the plan/query that you were expecting after the rewriting? > Is the behavior you observed specific to timestamps? > > Best, > Stamatis > > On Thu, Jan 27, 2022 at 4:07 AM Thomas D'Silva > > wrote: > > > Justin, >

Re: MaterializedViewRule is not applied for queries on aggregate views that truncate timestamp

2022-01-26 Thread Thomas D'Silva
) used for the view and [2018-01-01 00:01:30, 2018-01-01 00:02:00) used for the table. Thank you, Thomas On Wed, Jan 26, 2022 at 2:25 PM Justin Swett wrote: > Have you experimented with flooring the query predicate? > > -Justin > > On Wed, Jan 26, 2022 at 10:54 AM Thomas D'S

MaterializedViewRule is not applied for queries on aggregate views that truncate timestamp

2022-01-26 Thread Thomas D'Silva
Hi, The existing MaterializedViewRule is not applied when the materialized view does not have a view predicate but the query contains a predicate. For eg for the following materialized view SELECT eventid, floor(ts to minute), count(*) as cnt FROM events GROUP BY eventid, floor(ts TO

Re: Question about FilterIntoJoinRule

2019-09-13 Thread Thomas D'Silva
|author > 1 | Les Miserables | 1 > > If you apply the a.name <> 'Victor' condition before the join > (over the author table) then you will get the following result. > > 'Les Miserables' > > If you apply the condition after the join you will get the empty result.

Question about FilterIntoJoinRule

2019-09-12 Thread Thomas D'Silva
We are using calcite to query data in Kudu. We have implemented our own sort rule that merges rows returned from kudu when a queries orders by columns in the same order as the primary key of the kudu table. For a query that does a left join, in order to get the planner to use my sort rule I had to

row value constructors for pagination

2019-08-28 Thread Thomas D'Silva
I am looking into the possibility of using row value constructors for paging through data. The query would be of the form SELECT * FROM t WHERE (pk1, pk2) > (2,'bar'); which should logically be equivalent to SELECT * FROM t WHERE pk1 > 2 OR (pk1=2 AND pk2>'bar') I found a previous thread where