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

Method assert_unique_exec_option_key

tests/common/test_vector.py:165–179  ·  view source on GitHub ↗

Assert that 'exec_option' dimension exist and 'key' is not exist yet in self.dimension['exec_option'].

(self, key)

Source from the content-addressed store, hash-verified

163 self.clear_dimension(name)
164
165 def assert_unique_exec_option_key(self, key):
166 """Assert that 'exec_option' dimension exist and 'key' is not exist yet
167 in self.dimension['exec_option']."""
168 assert_exec_option_key(key)
169 assert EXEC_OPTION in self.dimensions, (
170 "Must have '" + EXEC_OPTION + "' dimension previously declared!")
171
172 for vector in self.dimensions[EXEC_OPTION]:
173 assert key not in vector.value, (
174 "'{}' is already exist in '{}' dimension!".format(key, EXEC_OPTION))
175
176 # 'key' must not previously declared with add_exec_option_dimension().
177 assert key not in self.independent_exec_option_names, (
178 "['{}']['{}'] was previously declared with non-unique value: {}".format(
179 EXEC_OPTION, key, [dim.value for dim in self.dimensions[key]]))
180
181 def add_mandatory_exec_option(self, key, value):
182 """Append key=value pair into 'exec_option' dimension."""

Callers 3

Calls 2

assert_exec_option_keyFunction · 0.85
formatMethod · 0.45

Tested by

no test coverage detected