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

Method _create_basic_select_item

tests/comparison/query_generator.py:375–384  ·  view source on GitHub ↗
(self, table_exprs, return_type)

Source from the content-addressed store, hash-verified

373 return SelectClause(select_items)
374
375 def _create_basic_select_item(self, table_exprs, return_type):
376 max_children = self.profile.choose_nested_expr_count()
377 if max_children:
378 value = self.create_func_tree(return_type)
379 value = self.populate_func_with_vals(value, table_exprs)
380 elif return_type in table_exprs.col_types:
381 value = self.profile.choose_val_expr(table_exprs.cols_by_type[return_type])
382 else:
383 value = self.profile.choose_constant(return_type)
384 return SelectItem(value)
385
386 def create_func_tree(self, return_type, allow_subquery=False):
387 '''Returns an instance of a basic function that has all of it's arguments either set

Callers 1

_create_select_clauseMethod · 0.95

Calls 6

create_func_treeMethod · 0.95
SelectItemClass · 0.90
choose_val_exprMethod · 0.80
choose_constantMethod · 0.80

Tested by

no test coverage detected