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

Changing AvaticaDatabaseMetaData from class to interface breaks compatibility

    XMLWordPrintableJSON

    Details

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

      Description

      Changing AvaticaDatabaseMetaData from class to interface breaks compatability. I am getting javadoc errors like the following:

      [ERROR] Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.4:site (default-site) on project calcite: failed to get report for org.apache.maven.plugins:maven-javadoc-plugin: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.2:compile (default-compile) on project calcite-core: Compilation failure: Compilation failure:
      [ERROR] /home/jhyde/open1/calcite.3/core/src/main/java/org/apache/calcite/jdbc/CalciteJdbc41Factory.java:[259,15] no interface expected here
      [ERROR] /home/jhyde/open1/calcite.3/core/src/main/java/org/apache/calcite/jdbc/CalciteMetaImpl.java:[76,8] org.apache.calcite.jdbc.CalciteMetaImpl is not abstract and does not override abstract method executeBatch(org.apache.calcite.avatica.Meta.StatementHandle,java.util.List<java.util.List<org.apache.calcite.avatica.remote.TypedValue>>) in org.apache.calcite.avatica.Meta
      [ERROR] /home/jhyde/open1/calcite.3/core/src/main/java/org/apache/calcite/jdbc/CalciteJdbc41Factory.java:[45,8] org.apache.calcite.jdbc.CalciteJdbc41Factory is not abstract and does not override abstract method newDatabaseMetaData(org.apache.calcite.avatica.AvaticaConnection) in org.apache.calcite.avatica.AvaticaFactory
      [ERROR] /home/jhyde/open1/calcite.3/core/src/main/java/org/apache/calcite/jdbc/CalciteJdbc41Factory.java:[63,40] newDatabaseMetaData(org.apache.calcite.avatica.AvaticaConnection) in org.apache.calcite.jdbc.CalciteJdbc41Factory cannot implement newDatabaseMetaData(org.apache.calcite.avatica.AvaticaConnection) in org.apache.calcite.avatica.AvaticaFactory
      [ERROR] return type org.apache.calcite.jdbc.CalciteJdbc41Factory.CalciteJdbc41DatabaseMetaData is not compatible with org.apache.calcite.avatica.AvaticaDatabaseMetaData
      

      This is telling us that Calcite is not compatible with the new version of Avatica. Other apps that have 'class Foo extends AvaticaDatabaseMetaData' will have the same problem.

      I had reservations about making extensions to JDBC interfaces but if we are going to have interface AvaticaXxx extends DatabaseMetaData it can not be called AvaticaDatabaseMetaData – that name is already taken by a class.

      Introduced by https://github.com/apache/calcite/commit/ba9783f, CALCITE-836.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                elserj Josh Elser
                Reporter:
                julianhyde Julian Hyde
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: