You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Jesus Camacho Rodriguez (Jira)" <ji...@apache.org> on 2020/05/14 02:31:00 UTC

[jira] [Commented] (CALCITE-3999) Simplify DialectPool implementation using Guava cache

    [ https://issues.apache.org/jira/browse/CALCITE-3999?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17106808#comment-17106808 ] 

Jesus Camacho Rodriguez commented on CALCITE-3999:
--------------------------------------------------

I have created a PR in https://github.com/apache/calcite/pull/1977/.

> Simplify DialectPool implementation using Guava cache
> -----------------------------------------------------
>
>                 Key: CALCITE-3999
>                 URL: https://issues.apache.org/jira/browse/CALCITE-3999
>             Project: Calcite
>          Issue Type: Improvement
>          Components: core
>            Reporter: Jesus Camacho Rodriguez
>            Assignee: Jesus Camacho Rodriguez
>            Priority: Major
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> JdbcUtils contains a pool to cache SqlDialect objects. Currently, it relies on multiple maps and a synchronized {{get}} method. Although I am not very familiar with that code, it seems the implementation could be made simpler and more efficient by using a Guava cache. In addition, since we would not have a single synchronized get method, multiple threads could concurrently create dialects for distinct data sources.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)