Uploaded image for project: 'Apache Drill'
  1. Apache Drill
  2. DRILL-7415

Information schema query fails for postgres foreign tables

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.16.0
    • Fix Version/s: 1.18.0
    • Component/s: None
    • Labels:
      None

      Description

      1) Setup a JDBC driver in Drill to Postgres
      2) Create a public foreign tables like below in postgres

      public | vessel | foreign table | postgres
      public | vessel_movement | foreign table | postgres
      public | vessel_movement_hist | foreign table | postgres
      3) Execute query in Drill

      SELECT * FROM `INFORMATION_SCHEMA`.`TABLES`;

      Actual result

      Caused by: java.lang.IllegalArgumentException: Multiple entries with same key: vessel=JdbcTable {vessel} and vessel=JdbcTable {vessel}
              at com.google.common.collect.ImmutableMap.checkNoConflict(ImmutableMap.java:136) ~[guava-19.0.jar:na]
              at com.google.common.collect.RegularImmutableMap.checkNoConflictInKeyBucket(RegularImmutableMap.java:98) ~[guava-19.0.jar:na]
              at com.google.common.collect.RegularImmutableMap.fromEntryArray(RegularImmutableMap.java:84) ~[guava-19.0.jar:na]
              at com.google.common.collect.ImmutableMap$Builder.build(ImmutableMap.java:295) ~[guava-19.0.jar:na]
              at org.apache.calcite.adapter.jdbc.JdbcSchema.computeTables(JdbcSchema.java:269) ~[calcite-core-1.18.0-drill-r0.jar:1.18.0-drill-r0]
              at org.apache.calcite.adapter.jdbc.JdbcSchema.getTableMap(JdbcSchema.java:285) ~[calcite-core-1.18.0-drill-r0.jar:1.18.0-drill-r0]
              at org.apache.calcite.adapter.jdbc.JdbcSchema.getTableNames(JdbcSchema.java:410) ~[calcite-core-1.18.0-drill-r0.jar:1.18.0-drill-r0]
              at org.apache.drill.exec.store.jdbc.JdbcStoragePlugin$CapitalizingJdbcSchema.getTableNames(JdbcStoragePlugin.java:282) ~[drill-jdbc-storage-1.16.0.jar:1.16.0]
              at org.apache.drill.exec.store.AbstractSchema.getTableNamesAndTypes(AbstractSchema.java:299) ~[drill-java-exec-1.16.0.jar:1.16.0]
              at org.apache.drill.exec.store.ischema.InfoSchemaRecordGenerator$Tables.visitTables(InfoSchemaRecordGenerator.java:340) ~[drill-java-exec-1.16.0.jar:1.16.0]
              at org.apache.drill.exec.store.ischema.InfoSchemaRecordGenerator.scanSchema(InfoSchemaRecordGenerator.java:254) ~[drill-java-exec-1.16.0.jar:1.16.0]
              at org.apache.drill.exec.store.ischema.InfoSchemaRecordGenerator.scanSchema(InfoSchemaRecordGenerator.java:247) ~[drill-java-exec-1.16.0.jar:1.16.0]
              at org.apache.drill.exec.store.ischema.InfoSchemaRecordGenerator.scanSchema(InfoSchemaRecordGenerator.java:247) ~[drill-java-exec-1.16.0.jar:1.16.0]
              at org.apache.drill.exec.store.ischema.InfoSchemaRecordGenerator.scanSchema(InfoSchemaRecordGenerator.java:234) ~[drill-java-exec-1.16.0.jar:1.16.0]
              at org.apache.drill.exec.store.ischema.InfoSchemaTableType.getRecordReader(InfoSchemaTableType.java:58) ~[drill-java-exec-1.16.0.jar:1.16.0]
              at org.apache.drill.exec.store.ischema.InfoSchemaBatchCreator.getBatch(InfoSchemaBatchCreator.java:34) ~[drill-java-exec-1.16.0.jar:1.16.0]
              at org.apache.drill.exec.store.ischema.InfoSchemaBatchCreator.getBatch(InfoSchemaBatchCreator.java:30) ~[drill-java-exec-1.16.0.jar:1.16.0]
              at org.apache.drill.exec.physical.impl.ImplCreator.getRecordBatch(ImplCreator.java:159) ~[drill-java-exec-1.16.0.jar:1.16.0]
              at org.apache.drill.exec.physical.impl.ImplCreator.getChildren(ImplCreator.java:182) ~[drill-java-exec-1.16.0.jar:1.16.0]
              at org.apache.drill.exec.physical.impl.ImplCreator.getRecordBatch(ImplCreator.java:137) ~[drill-java-exec-1.16.0.jar:1.16.0]
              at org.apache.drill.exec.physical.impl.ImplCreator.getChildren(ImplCreator.java:182) ~[drill-java-exec-1.16.0.jar:1.16.0]
              at org.apache.drill.exec.physical.impl.ImplCreator.getRootExec(ImplCreator.java:110) ~[drill-java-exec-1.16.0.jar:1.16.0]
              at org.apache.drill.exec.physical.impl.ImplCreator.getExec(ImplCreator.java:87) ~[drill-java-exec-1.16.0.jar:1.16.0]
              at org.apache.drill.exec.work.fragment.FragmentExecutor.run(FragmentExecutor.java:263) [drill-java-exec-1.16.0.jar:1.16.0]
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                ihuzenko Igor Guzenko
                Reporter:
                ihuzenko Igor Guzenko
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: