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

Method __fetch_rows

tests/shell/test_shell_client.py:82–91  ·  view source on GitHub ↗

Fetches all rows using the given fetch_batches generator. Asserts that num_batches batches are produced by the generator and that num_rows are returned.

(self, fetch_batches, num_batches, num_rows)

Source from the content-addressed store, hash-verified

80 client.close_connection()
81
82 def __fetch_rows(self, fetch_batches, num_batches, num_rows):
83 """Fetches all rows using the given fetch_batches generator. Asserts that num_batches
84 batches are produced by the generator and that num_rows are returned."""
85 num_batches_count = 0
86 rows_per_batch = num_rows // num_batches
87 for fetch_batch in fetch_batches:
88 assert len(fetch_batch) == rows_per_batch
89 num_batches_count += 1
90 if num_batches_count == num_batches: break
91 assert num_batches_count == num_batches
92
93 def __get_shell_client(self, vector, fetch_size=1024):
94 """Returns the client specified by the protocol in the given vector."""

Callers 2

test_fetch_sizeMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected