MCPcopy Create free account
hub / github.com/apache/impala / construct_table_with_header

Method construct_table_with_header

shell/impala_shell/impala_shell.py:1623–1633  ·  view source on GitHub ↗

Constructs the table header for a given query handle. Should be called after the query has finished and before data is fetched. All data is left aligned.

(self, column_names)

Source from the content-addressed store, hash-verified

1621 return CmdStatus.ERROR
1622
1623 def construct_table_with_header(self, column_names):
1624 """ Constructs the table header for a given query handle.
1625
1626 Should be called after the query has finished and before data is fetched.
1627 All data is left aligned.
1628 """
1629 table = prettytable.PrettyTable()
1630 for column in column_names:
1631 table.add_column(column, [])
1632 table.align = "l"
1633 return table
1634
1635 def do_values(self, args):
1636 """Executes a VALUES(...) query, fetching all rows"""

Callers 2

_format_outputstreamMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected