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

Function create_exec_option_dimension_from_dict

tests/common/test_dimensions.py:282–303  ·  view source on GitHub ↗

Builds a query exec option test dimension Exhaustively goes through all combinations of the given query option values. For each combination create an exec option dictionary and add it as a value in the exec option test dimension. Each dictionary can then be passed via Beeswax to control

(exec_option_dimensions)

Source from the content-addressed store, hash-verified

280
281
282def create_exec_option_dimension_from_dict(exec_option_dimensions):
283 """
284 Builds a query exec option test dimension
285
286 Exhaustively goes through all combinations of the given query option values.
287 For each combination create an exec option dictionary and add it as a value in the
288 exec option test dimension. Each dictionary can then be passed via Beeswax to control
289 Impala query execution behavior.
290
291 TODO: In the future we could generate these values using pairwise to reduce total
292 execution time.
293 """
294 # Generate the cross product (all combinations) of the exec options specified. Then
295 # store them in exec_option dictionary format.
296 keys = sorted(exec_option_dimensions)
297 for name in keys:
298 assert_exec_option_key(name)
299 combinations = product(*(exec_option_dimensions[name] for name in keys))
300 exec_option_dimension_values = [dict(zip(keys, prod)) for prod in combinations]
301
302 # Build a test vector out of it
303 return ImpalaTestDimension(EXEC_OPTION, *exec_option_dimension_values)
304
305
306def add_exec_option_dimension(test_suite, key, values):

Callers 15

add_test_dimensionsMethod · 0.90
add_test_dimensionsMethod · 0.90
add_test_dimensionsMethod · 0.90
add_test_dimensionsMethod · 0.90
add_test_dimensionsMethod · 0.90
add_test_dimensionsMethod · 0.90
add_test_dimensionsMethod · 0.90
add_test_dimensionsMethod · 0.90
add_test_dimensionsMethod · 0.90
add_test_dimensionsMethod · 0.90
add_test_dimensionsMethod · 0.90
add_test_dimensionsMethod · 0.90

Calls 3

assert_exec_option_keyFunction · 0.90
ImpalaTestDimensionClass · 0.90
zipFunction · 0.85

Tested by

no test coverage detected