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

Function parse_runtime_profile_table_formats

tests/util/test_file_parser.py:183–197  ·  view source on GitHub ↗
(subsection_comment)

Source from the content-addressed store, hash-verified

181
182
183def parse_runtime_profile_table_formats(subsection_comment):
184 prefix = "table_format="
185 if not subsection_comment.startswith(prefix):
186 raise RuntimeError('RUNTIME_PROFILE comment (%s) must be of the form '
187 '"table_format=FORMAT[,FORMAT2,...]"' % subsection_comment)
188
189 parsed_formats = subsection_comment[len(prefix):].split(',')
190 table_formats = list()
191 for table_format in parsed_formats:
192 if table_format not in ALLOWED_TABLE_FORMATS:
193 raise RuntimeError('RUNTIME_PROFILE table format (%s) must be in: %s' %
194 (table_format, ALLOWED_TABLE_FORMATS))
195 else:
196 table_formats.append(table_format)
197 return table_formats
198
199
200def parse_test_file_text(text, valid_section_names, skip_unknown_sections=True):

Callers 1

parse_test_file_textFunction · 0.85

Calls 2

RuntimeErrorFunction · 0.85
appendMethod · 0.45

Tested by

no test coverage detected