Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-1325

Druid adapter requires Guava 14.0 or higher

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.8.0
    • Fix Version/s: 1.9.0
    • Component/s: None
    • Labels:
      None

      Description

      Druid adapter requires Guava version 14 or higher. With guava-13.0.1 compile fails as follows, due to the missing Maps.asMap method, which was added in 14.0:

      [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.2:compile (default-compile) on project calcite-druid: Compilation failure
      [ERROR] /home/jhyde/regress/calcite/druid/src/main/java/org/apache/calcite/adapter/druid/DruidSchema.java:[66,16] method asMap in class com.google.common.collect.Maps cannot be applied to given types;
      [ERROR] required: java.util.SortedSet<K>,com.google.common.base.Function<? super K,V>
      [ERROR] found: com.google.common.collect.ImmutableSet<java.lang.String>,com.google.common.cache.LoadingCache<java.lang.String,org.apache.calcite.schema.Table>
      [ERROR] reason: cannot infer type-variable(s) K,V
      [ERROR] (argument mismatch; com.google.common.collect.ImmutableSet<java.lang.String> cannot be converted to java.util.SortedSet<K>)
      

      We were incorrect to state that Calcite release 1.8 works with "Guava versions 12.0.1 to 19.0"; it should state "Guava versions 14.0 to 19.0".

      Calcite release 1.7 and earlier do not have this problem.

        Issue Links

          Activity

          Show
          julianhyde Julian Hyde added a comment - Fixed in http://git-wip-us.apache.org/repos/asf/calcite/commit/d1f4f885 .
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user vlsi commented on the issue:

          https://github.com/apache/jmeter/pull/221

          >regarding guava compatibility:

          Regarding "guava usage in Apache Calcite project": https://issues.apache.org/jira/browse/CALCITE-1325

          >We were incorrect to state that Calcite release 1.8 works with "Guava versions 12.0.1 to 19.0"; it should state "Guava versions 14.0 to 19.0".
          >Calcite release 1.7 and earlier do not have this problem.

          And so on. The idea is JMeter releases are very rare, and I do not like the idea of making guava a yet another reason to make "urgent compatibility releases".

          >Regarding your proposal, there is only 1 contributor to this library, so I am not a fan.

          The idea is there is no need to improve the library. All the bugs are resolved long ago, so CLHM serves its purpose well.

          CLHM is superseded by https://github.com/ben-manes/caffeine (java8 only) cache.

          >I prefer that we just use ConcurrentHashmap then.

          CHM has no way to evict old entries, thus if using just CHM, there would be a risk of running out of memory (e.g. when CSS resource URLS are dynamically generated). I do not like exposing JMeter users to OutOfMemory conditions.

          Show
          githubbot ASF GitHub Bot added a comment - Github user vlsi commented on the issue: https://github.com/apache/jmeter/pull/221 >regarding guava compatibility: Regarding "guava usage in Apache Calcite project": https://issues.apache.org/jira/browse/CALCITE-1325 >We were incorrect to state that Calcite release 1.8 works with "Guava versions 12.0.1 to 19.0"; it should state "Guava versions 14.0 to 19.0". >Calcite release 1.7 and earlier do not have this problem. And so on. The idea is JMeter releases are very rare, and I do not like the idea of making guava a yet another reason to make "urgent compatibility releases". >Regarding your proposal, there is only 1 contributor to this library, so I am not a fan. The idea is there is no need to improve the library. All the bugs are resolved long ago, so CLHM serves its purpose well. CLHM is superseded by https://github.com/ben-manes/caffeine (java8 only) cache. >I prefer that we just use ConcurrentHashmap then. CHM has no way to evict old entries, thus if using just CHM, there would be a risk of running out of memory (e.g. when CSS resource URLS are dynamically generated). I do not like exposing JMeter users to OutOfMemory conditions.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user julianhyde commented on the issue:

          https://github.com/apache/jmeter/pull/221

          For the record, regarding https://issues.apache.org/jira/browse/CALCITE-1325. That was not an example of "JAR hell". Calcite attempts to maintain compatibility with a wide range of Guava versions and that was a case where our QA process screwed up and we slipped a little. To date no one has ever said "I can't use Calcite because you require Guava X and we use Guava Y".

          Show
          githubbot ASF GitHub Bot added a comment - Github user julianhyde commented on the issue: https://github.com/apache/jmeter/pull/221 For the record, regarding https://issues.apache.org/jira/browse/CALCITE-1325 . That was not an example of "JAR hell". Calcite attempts to maintain compatibility with a wide range of Guava versions and that was a case where our QA process screwed up and we slipped a little. To date no one has ever said "I can't use Calcite because you require Guava X and we use Guava Y".
          Hide
          jcamachorodriguez Jesus Camacho Rodriguez added a comment -

          Resolved in release 1.9.0 (2016-09-22)

          Show
          jcamachorodriguez Jesus Camacho Rodriguez added a comment - Resolved in release 1.9.0 (2016-09-22)

            People

            • Assignee:
              julianhyde Julian Hyde
              Reporter:
              julianhyde Julian Hyde
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development