You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@calcite.apache.org by xiaobo <gu...@qq.com.INVALID> on 2022/02/11 15:01:13 UTC

回复:reply: calcite multi-threading problem

I mean it seems not a janino related problem, if we put the connection opening and sql executing operationes in the same thread the&nbsp; same error does not appear, but with a sql related problem with I sent in another mail.




------------------&nbsp;原始邮件&nbsp;------------------
发件人:                                                                                                                        "xiaobo "                                                                                    <guxiaobo1982@qq.com&gt;;
发送时间:&nbsp;2022年2月11日(星期五) 晚上10:46
收件人:&nbsp;"dev"<dev@calcite.apache.org&gt;;

主题:&nbsp;reply: calcite multi-threading problem



we use maven and the effective pom contains only the 3.1.0 version of janino as following:


<properties&gt;
&nbsp; &nbsp; ...
&nbsp; &nbsp; <janino.version&gt;3.1.0</janino.version&gt;

...
&nbsp;<dependency&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; <groupId&gt;org.codehaus.janino</groupId&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; <artifactId&gt;commons-compiler</artifactId&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; <version&gt;3.1.0</version&gt;
&nbsp;&nbsp;&nbsp; &nbsp; </dependency&gt;
&nbsp;&nbsp;&nbsp; &nbsp; <dependency&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; <groupId&gt;org.codehaus.janino</groupId&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; <artifactId&gt;commons-compiler-jdk</artifactId&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; <version&gt;3.1.0</version&gt;
&nbsp;&nbsp;&nbsp; &nbsp; </dependency&gt;
&nbsp;&nbsp;&nbsp; &nbsp; <dependency&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; <groupId&gt;org.codehaus.janino</groupId&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; <artifactId&gt;janino</artifactId&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; <version&gt;3.1.0</version&gt;
&nbsp;&nbsp;&nbsp; &nbsp; </dependency&gt;


there is no other dependent versions of janino





------------------ 原始邮件 ------------------
发件人:                                                                                                                        "dev"                                                                                    <dm.sysolyatin@gmail.com&gt;;
发送时间:&nbsp;2022年2月11日(星期五) 晚上9:18
收件人:&nbsp;"dev"<dev@calcite.apache.org&gt;;

主题:&nbsp;Re: calcite multi-threading problem



Actually, I had the same problem with spark. Spark 3.2.1 uses the old
version of janino, calcite 1.29 uses the new version of janino and they are
not compatible.
If I downgrade janino version to version which spark uses I got an error
not method found exception
If I upgrade the janino version to the version which calcite uses I get the
same error but with another method.

As a result, I built a separate calcite jar package where I shaded janino
dependency



On Fri, Feb 11, 2022 at 2:39 PM stanilovsky evgeny <
estanilovskiy@gridgain.com&gt; wrote:

&gt; for example on a current calcite branch:
&gt; grep janino gradle.properties
&gt; janino.version=3.1.6
&gt;
&gt;
&gt; &gt; yes, we use drools in the same project,&amp;nbsp; and drools uses janino
&gt; &gt; too, is there a version list of janino which calcite supports?
&gt; &gt;
&gt; &gt;
&gt; &gt;
&gt; &gt;
&gt; &gt; ---Original---
&gt; &gt; From: "Dmitry Sysolyatin"<dm.sysolyatin@gmail.com&amp;gt;
&gt; &gt; Date: Fri, Feb 11, 2022 18:30 PM
&gt; &gt; To: "dev"<dev@calcite.apache.org&amp;gt;;
&gt; &gt; Subject: Re: calcite multi-threading problem
&gt; &gt;
&gt; &gt;
&gt; &gt; Hi!
&gt; &gt;
&gt; It&amp;nbsp;looks&amp;nbsp;like&amp;nbsp;a&amp;nbsp;dependency&amp;nbsp;issue,&amp;nbsp;not&amp;nbsp;like&amp;nbsp;a&amp;nbsp;multi-threading&amp;nbsp;issue.&amp;nbsp;Most
&gt; &gt;
&gt; likely&amp;nbsp;you&amp;nbsp;have&amp;nbsp;some&amp;nbsp;dependency&amp;nbsp;that&amp;nbsp;use&amp;nbsp;another&amp;nbsp;version&amp;nbsp;of&amp;nbsp;janino&amp;nbsp;but
&gt; &gt; calcite&amp;nbsp;requires&amp;nbsp;another&amp;nbsp;one
&gt; &gt;
&gt; &gt;
&gt; On&amp;nbsp;Fri,&amp;nbsp;Feb&amp;nbsp;11,&amp;nbsp;2022&amp;nbsp;at&amp;nbsp;12:18&amp;nbsp;PM&amp;nbsp;xiaobo&amp;nbsp;<guxiaobo1982@qq.com.invalid
&gt; &amp;gt;&amp;nbsp;wrote:
&gt; &gt;
&gt; &gt; &amp;gt;&amp;nbsp;Hi,
&gt; &gt; &amp;gt;
&gt; &gt; &amp;gt;
&gt; &gt;
&gt; &amp;gt;&amp;nbsp;we&amp;nbsp;open&amp;nbsp;a&amp;nbsp;calcite&amp;nbsp;connection&amp;nbsp;with&amp;nbsp;ReflectiveSchema&amp;nbsp;in&amp;nbsp;one&amp;nbsp;thread,&amp;nbsp;and
&gt; &gt;
&gt; &amp;gt;&amp;nbsp;execute&amp;nbsp;sqls&amp;nbsp;in&amp;nbsp;other&amp;nbsp;&amp;nbsp;threads&amp;nbsp;against&amp;nbsp;the&amp;nbsp;connection,&amp;nbsp;but&amp;nbsp;failed&amp;nbsp;with
&gt; &gt; &amp;gt;&amp;nbsp;this&amp;nbsp;error
&gt; &gt; &amp;gt;
&gt; &gt; &amp;gt;
&gt; &gt; &amp;gt;
&gt; &gt; &amp;gt;
&gt; &gt; &amp;gt;&amp;nbsp;com.google.common.util.concurrent.ExecutionError:
&gt; &gt; &amp;gt;&amp;nbsp;java.lang.NoSuchMethodError:
&gt; &gt; &amp;gt;
&gt; &gt;
&gt; &amp;gt;&amp;nbsp;org.codehaus.commons.compiler.CompilerFactoryFactory.getDefaultCompilerFactory(Ljava/lang/ClassLoader;)
&gt; &gt; &amp;gt;
&gt; &gt; &amp;gt;&amp;nbsp;Lorg/codehaus/commons/compiler/ICompilerFactory;
&gt; &gt; &amp;gt;
&gt; &gt; &amp;gt;
&gt; &gt;
&gt; &amp;gt;&amp;nbsp;do&amp;nbsp;we&amp;nbsp;miss&amp;nbsp;anything&amp;nbsp;regarding&amp;nbsp;to&amp;nbsp;multi-threading&amp;nbsp;with&amp;nbsp;calcite?
&gt;