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

Class InlineView

tests/comparison/query.py:483–516  ·  view source on GitHub ↗

Represents an inline view. Ex: In the query "SELECT * FROM (SELECT * FROM foo) AS bar", "(SELECT * FROM foo) AS bar" would be an inline view.

Source from the content-addressed store, hash-verified

481
482
483class InlineView(TableExpr):
484 '''Represents an inline view.
485
486 Ex: In the query "SELECT * FROM (SELECT * FROM foo) AS bar",
487 "(SELECT * FROM foo) AS bar" would be an inline view.
488
489 '''
490
491 def __init__(self, query):
492 self.query = query
493 self.alias = None
494 self.is_visible = True
495
496 @property
497 def identifier(self):
498 return self.alias
499
500 @property
501 def cols(self):
502 return ValExprList(Column(self, item.name, item.type) for item in
503 self.query.select_clause.items)
504
505 @property
506 def collections(self):
507 return []
508
509 def __repr__(self):
510 return '%s<%s>' % (type(self).__name__, ', '.join(repr(col) for col in self.cols))
511
512 def __deepcopy__(self, memo):
513 other = InlineView(deepcopy(self.query, memo))
514 other.alias = self.alias
515 other.is_visible = self.is_visible
516 return other
517
518
519class WithClause(object):

Callers 3

_create_inline_viewMethod · 0.90
__deepcopy__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected