code: def _get_table_schema_hack(cursor, table):
      
      # get the schema of the query result via a LIMIT 0 hack
      cursor.execute('SELECT * FROM %s LIMIT 0' % table)
      schema = [tup[:2] for tup in cursor.description]
      cursor.fetchall()  # resets the state of the cursor and closes operation
      return schema
docs: Get the schema of table by talking to Impala
  
      table must be a string (incl possible db name)