Uploaded image for project: 'Phoenix'
  1. Phoenix
  2. PHOENIX-5936

sqlAlchemy get_columns KeyError: None

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: queryserver-6.0.0
    • Fix Version/s: queryserver-6.0.0
    • Component/s: queryserver
    • Labels:
      None

      Description

      callingĀ  inspector.get_columns() on a table with constraints will result in the following error:

      Traceback (most recent call last):
       File "/home/romain/projects/hue/desktop/libs/notebook/src/notebook/connectors/sql_alchemy.py", line 101, in decorator return func(*args, **kwargs)
       File "/home/romain/projects/hue/desktop/libs/notebook/src/notebook/connectors/sql_alchemy.py", line 362, in autocomplete
       columns = assist.get_columns(database, table)
       File "/home/romain/projects/hue/desktop/libs/notebook/src/notebook/connectors/sql_alchemy.py", line 453, in get_columns return self.db.get_columns(table, database)
       File "/home/romain/projects/hue/build/env/lib/python3.8/site-packages/sqlalchemy/engine/reflection.py", line 372, in get_columns
       col_defs = self.dialect.get_columns(
       File "/home/romain/projects/hue/build/env/lib/python3.8/site-packages/phoenixdb/sqlalchemy_phoenix.py", line 163, in get_columns
       col_type = COLUMN_DATA_TYPE[row[1]]
       KeyError: None

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                stoty Istvan Toth
                Reporter:
                romainr Romain Rigaux
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: