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

Method create_table

tests/custom_cluster/test_tuple_cache.py:131–139  ·  view source on GitHub ↗
(self, fq_table, scale=1)

Source from the content-addressed store, hash-verified

129
130 # Generates a table containing at least <scale> KB of data.
131 def create_table(self, fq_table, scale=1):
132 self.execute_query("CREATE TABLE {0} ({1})".format(fq_table, TABLE_LAYOUT))
133 # To make the rows distinct, we keep using a different seed for table_value
134 global_index = 0
135 for _ in range(scale):
136 values = [table_value(i) for i in range(global_index, global_index + 70)]
137 self.execute_query("INSERT INTO {0} VALUES ({1})".format(
138 fq_table, "), (".join(values)))
139 global_index += 70
140
141 # Helper function to get a tuple cache metric from a single impalad.
142 def get_tuple_cache_metric(self, impalaservice, suffix):

Calls 5

rangeFunction · 0.85
table_valueFunction · 0.85
execute_queryMethod · 0.45
formatMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected