[
https://issues.apache.org/jira/browse/CALCITE-4079?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17149346#comment-17149346
]
TANG Wen-hui edited comment on CALCITE-4079 at 7/2/20, 12:23 PM:
-----------------------------------------------------------------
Hello [~zabetak] [~julianhyde]
I created my own parser depending on the Parser.jj template, and I have two
tests for the new parser which are PivotParserTest and PivotRelToSqlTest.
When I try to do "mvn test", the test process was blocked.
>From the below details, I found the test blocked in two places where
>CalciteSqlDialect.DEFAULT and AnsiSqlDialect.DEFAULT was used.
The CalciteSqlDialect.DEFAULT are used in PivotRelToSqlTest, PivotParserTest
extends the SqlParserTest and use the SqlNode#toSqlString which is related with
AnsiSqlDialect.DEFAULT.
!image-2020-07-01-19-27-25-354.png!
{code:java}
Full thread dump OpenJDK 64-Bit Server VM (25.222-b10 mixed mode):
"pool-1-thread-8" #20 daemon prio=5 os_prio=0 tid=0x000000001a35a000 nid=0x63e4
in Object.wait() [0x000000001b56e000]
java.lang.Thread.State: RUNNABLE
at org.apache.calcite.sql.SqlNode.toSqlString(SqlNode.java:146)
at
org.apache.calcite.sql.parser.SqlParserTest$TesterImpl.check(SqlParserTest.java:8845)
at
org.apache.calcite.sql.parser.SqlParserTest$TesterImpl.check(SqlParserTest.java:8865)
at
org.apache.calcite.sql.parser.SqlParserTest$Sql.ok(SqlParserTest.java:9126)
at
org.apache.calcite.supersql.pivot.test.parser.PivotParserTest.testBitwiseOperator(PivotParserTest.java:138)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at
org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at
org.apache.maven.surefire.junitcore.pc.Scheduler$1.run(Scheduler.java:410)
at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
"pool-1-thread-7" #19 daemon prio=5 os_prio=0 tid=0x000000001a3c9000 nid=0x5954
in Object.wait() [0x000000001b46e000]
java.lang.Thread.State: RUNNABLE
at
org.apache.calcite.supersql.pivot.test.reltosql.PivotRelToSqlTest.sql(PivotRelToSqlTest.java:127)
at
org.apache.calcite.supersql.pivot.test.reltosql.PivotRelToSqlTest.testSubQueryAlias(PivotRelToSqlTest.java:1351)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at
org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at
org.apache.maven.surefire.junitcore.pc.Scheduler$1.run(Scheduler.java:410)
at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
{code}
was (Author: winipanda):
Hello [~zabetak] [~julianhyde]
I created my own parser depend on the Parser.jj template, and I have two tests
for the new parser which are PivotParserTest and PivotRelToSqlTest.
When I try to do "mvn test", the test process was blocked.
>From the below details, I found the test blocked in two places where
>CalciteSqlDialect.DEFAULT and AnsiSqlDialect.DEFAULT was used.
The CalciteSqlDialect.DEFAULT are used in PivotRelToSqlTest, PivotParserTest
extends the SqlParserTest and use the SqlNode#toSqlString which is related with
AnsiSqlDialect.DEFAULT.
!image-2020-07-01-19-27-25-354.png!
{code:java}
Full thread dump OpenJDK 64-Bit Server VM (25.222-b10 mixed mode):
"pool-1-thread-8" #20 daemon prio=5 os_prio=0 tid=0x000000001a35a000 nid=0x63e4
in Object.wait() [0x000000001b56e000]
java.lang.Thread.State: RUNNABLE
at org.apache.calcite.sql.SqlNode.toSqlString(SqlNode.java:146)
at
org.apache.calcite.sql.parser.SqlParserTest$TesterImpl.check(SqlParserTest.java:8845)
at
org.apache.calcite.sql.parser.SqlParserTest$TesterImpl.check(SqlParserTest.java:8865)
at
org.apache.calcite.sql.parser.SqlParserTest$Sql.ok(SqlParserTest.java:9126)
at
org.apache.calcite.supersql.pivot.test.parser.PivotParserTest.testBitwiseOperator(PivotParserTest.java:138)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at
org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at
org.apache.maven.surefire.junitcore.pc.Scheduler$1.run(Scheduler.java:410)
at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
"pool-1-thread-7" #19 daemon prio=5 os_prio=0 tid=0x000000001a3c9000 nid=0x5954
in Object.wait() [0x000000001b46e000]
java.lang.Thread.State: RUNNABLE
at
org.apache.calcite.supersql.pivot.test.reltosql.PivotRelToSqlTest.sql(PivotRelToSqlTest.java:127)
at
org.apache.calcite.supersql.pivot.test.reltosql.PivotRelToSqlTest.testSubQueryAlias(PivotRelToSqlTest.java:1351)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at
org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at
org.apache.maven.surefire.junitcore.pc.Scheduler$1.run(Scheduler.java:410)
at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
{code}
> Remove the deprecated code from SqlDialect
> ------------------------------------------
>
> Key: CALCITE-4079
> URL: https://issues.apache.org/jira/browse/CALCITE-4079
> Project: Calcite
> Issue Type: Improvement
> Components: core
> Affects Versions: 1.23.0
> Reporter: TANG Wen-hui
> Priority: Major
> Attachments: image-2020-07-01-19-27-25-354.png,
> image-2020-07-01-19-51-32-397.png
>
> Time Spent: 20m
> Remaining Estimate: 0h
>
> {code:java}
> /** @deprecated Use {@link AnsiSqlDialect#DEFAULT} instead. */
> @Deprecated // to be removed before 2.0
> public static final SqlDialect DUMMY =
> AnsiSqlDialect.DEFAULT;
> /** @deprecated Use {@link CalciteSqlDialect#DEFAULT} instead. */
> @Deprecated // to be removed before 2.0
> public static final SqlDialect CALCITE =
> CalciteSqlDialect.DEFAULT;{code}
> SqlDialect#DUMMY and SqlDialect#CALCITE are marked deprecated and have not be
> used in any places.
> It would be better to remove them to avoid class initialization deadlock.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
