Beispiel #1
0
    def __init__(self, table_results, table_schema, desc_results, desc_schema):
        if beeswax_conf.THRIFT_VERSION.get() >= 7:
            if not table_results.columns:
                raise NoSuchObjectException()
            self.table = table_results.columns
        else:  # Deprecated. To remove in Hue 4.
            if not table_results.rows:
                raise NoSuchObjectException()
            self.table = table_results.rows and table_results.rows[0] or ''

        self.table_schema = table_schema
        self.desc_results = desc_results
        self.desc_schema = desc_schema
Beispiel #2
0
 def __init__(self, table_results, table_schema, desc_results, desc_schema):
     if not table_results.rows:
         raise NoSuchObjectException()
     self.table = table_results.rows and table_results.rows[0] or ''
     self.table_schema = table_schema
     self.desc_results = desc_results
     self.desc_schema = desc_schema
Beispiel #3
0
  def __init__(self, table_results, table_schema, desc_results, desc_schema):
    if beeswax_conf.THRIFT_VERSION.get() >= 7:
      if not table_results.columns:
        raise NoSuchObjectException()
      self.table = table_results.columns
    else: # Deprecated. To remove in Hue 4.
      if not table_results.rows:
        raise NoSuchObjectException()
      self.table = table_results.rows and table_results.rows[0] or ''

    self.table_schema = table_schema
    self.desc_results = desc_results
    self.desc_schema = desc_schema
    self.is_impala_only = False # Aka Kudu

    self.describe = HiveServerTTableSchema(self.desc_results, self.desc_schema).cols()
    self._details = None