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

Internal VARCHAR(1) breaks INFO._SCHEMA table string comparison

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 0.8.0
    • Metadata

    Description

      In org.apache.drill.exec.store.ischema.InfoSchemaTable, method getRelDataType(...) calls a version of RelDataTypeFactory.createSqlType(...) that sets the type of strings to VARCHAR(1) rather than VARCHAR(<some big number>).

      This breaks string comparison. (For example, "DATA_TYPE = 'IN'" returns true when the INFORMATION_SCHEMA.COLUMNS.DATA_TYPE value is "INTEGER".)

      Attachments

        1. DRILL-2283.1.patch.txt
          5 kB
          Daniel Barclay

        Activity

          People

            parthc Parth Chandra
            dsbos Daniel Barclay
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: