Re: calcite multi-threading problem

2022-02-17 Thread Stamatis Zampetakis
Hi, If each connection has its own schema object I suppose it will work but it is not something that is tested or documented. Best, Stamatis On Wed, Feb 16, 2022 at 1:49 AM xiaobo wrote: > Hi Stamatis, > > Finally we are talking about the threading side about the problem, > > can we open multi

Pushing filters with unsafe operations (CAST/DIVISION) below inner joins

2022-02-17 Thread Stamatis Zampetakis
Hi all, Till today, I believed that pushing a filter below an inner join is not strictly related to the operators (equals, plus, minus, cast, division) present in the filter. However, the query below will return some results if the filter is executed after the join or it will fail with an excepti

Re: CoreRules not getting applied.

2022-02-17 Thread Stamatis Zampetakis
Hi Chathura, I added the following in RelOptRulesTest and the constant reduction seems to work fine on master: @Test void testTimestampAddReduce() { String sql = "select TIMESTAMPADD(DAY, 22, TIMESTAMP '1995-12-10 02:06:17') as\n" + "constant_col from emp"; sql(sql).withRule(Co

Re: Pushing filters with unsafe operations (CAST/DIVISION) below inner joins

2022-02-17 Thread Scott Reynolds
Is it feasible to prevent the filter push down in cases like this ( detect potential division by zero) ? What other exceptions that could happen? Should it only push down some filters and preserve the complex filter above the join? Regarding a Jira ticket, generating an exception when it should

Re: Pushing filters with unsafe operations (CAST/DIVISION) below inner joins

2022-02-17 Thread Julian Hyde
You should definitely log a bug, even if there are no plans to fix it. It is a violation of the standard, and therefore it is a bug, and therefore we should document that it exists. Can you do some research on the right terminology. You use the term ‘unsafe’. I think the PL community uses the t

CyclicMetadataException

2022-02-17 Thread Boyan Kolev
Hello, I'm coming across this exception when Calcite prepares queries in parallel. I see this happens if the same query is getting planned by two threads at the same time, but I also have the impression that this may also happen when the two queries being planned in parallel are not exactly the sa

Re: CyclicMetadataException

2022-02-17 Thread Julian Hyde
Planning is not thread-safe. For a given RelOptCluster, only one thread should be planning. If there are multiple queries (each with their own RelOptCluster) then they can safely be planned on separate threads. It’s possible that there are issues if queries are sharing materialized views. The

Build failed in Jenkins: Calcite » Calcite-snapshots #71

2022-02-17 Thread Apache Jenkins Server
See Changes: [nobigogle] [CALCITE-4912] Confusing javadoc of RexSimplify.simplify -- [...truncated 360.81 KB...] public static synchronized ClientCache cr