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

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

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.8.0
    • Component/s: 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

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

              Dates

              • Created:
                Updated:
                Resolved: