[
https://issues.apache.org/jira/browse/CALCITE-4760?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17408449#comment-17408449
]
Julian Hyde commented on CALCITE-4760:
--------------------------------------
I noticed that we are creating a connection and statement each time we call
{{RelBuilder.create}}. So I counted the number of calls in the test suite:
* 122,327 {{RelBuilder}} instances (including via {{RelBuilder.create}})
* 10,345 {{CalciteServerStatementImpl}} instances
* 9,555 {{CalciteConnectionImpl}} instances
* 510 {{RelBuilder.create}} calls
* 795 {{Frameworks.withPrepare}} calls
So, the number of {{RelBuilder.create}} calls isn't too worrying. I don't think
we should try to pool connections or statements at this time.
> RelBuilder creation fails with error 'No suitable driver found for
> jdbc:calcite:' in shaded Calcite
> ----------------------------------------------------------------------------------------------------
>
> Key: CALCITE-4760
> URL: https://issues.apache.org/jira/browse/CALCITE-4760
> Project: Calcite
> Issue Type: Bug
> Reporter: Steven Talbot
> Assignee: Julian Hyde
> Priority: Major
>
> {{RelBuilder}} creation fails with error 'No suitable driver found for
> jdbc:calcite:'. We should not need to initialize a "jdbc:calcite" driver to
> make a {{RelBuilder}}.
> We just tracked down a nasty issue with Calcite being shaded as a dependency
> in our code that could cause a stack like
>
> {noformat}
> No suitable driver found for jdbc:calcite:
> org/apache/calcite/tools/Frameworks.java:184:in withPrepare
> org/apache/calcite/tools/RelBuilder.java:225:in create
> {noformat}
> when calling {{RelBuilder.create}}.
> Our fault ultimately, but [~julianhyde] pointed out that Calcite really
> shouldn't be trying to make a JDBC connection here.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)