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

DatabaseMetadata.getColumns fails with SQL Server (Unknown SQL type -155, -150)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.10.0
    • None
    • Client - Java
    • None

    Description

      Attempting to call DatabaseMetadata.getColumns against SQL Server 2016 will fail for a datetimeoffset type.

      create type DISTSTZ from datetimeoffset;
      go

      create table "TDISTSTZ" ( "RNUM" integer not null , "CDISTSTZ" DISTSTZ );

      Exception in thread "main" java.sql.SQLException: Failure getting metadata: Unknown SQL type -155
      at org.apache.drill.jdbc.impl.DrillMetaImpl$MetadataAdapter.getMeta(DrillMetaImpl.java:310)
      at org.apache.drill.jdbc.impl.DrillMetaImpl.serverGetColumns(DrillMetaImpl.java:713)
      at org.apache.drill.jdbc.impl.DrillMetaImpl.getColumns(DrillMetaImpl.java:971)
      at oadd.org.apache.calcite.avatica.AvaticaDatabaseMetaData.getColumns(AvaticaDatabaseMetaData.java:621)
      at org.apache.drill.jdbc.impl.DrillDatabaseMetaDataImpl.getColumns(DrillDatabaseMetaDataImpl.java:1186)

      Similar problem with columns of VARIANT type

      Attachments

        Activity

          People

            Unassigned Unassigned
            the6campbells N Campbell
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: