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

Class WithClauseInlineView

tests/comparison/query.py:538–564  ·  view source on GitHub ↗

Represents the entries in a WITH clause. These are very similar to InlineViews but may have an additional alias. Ex: WITH bar AS (SELECT * FROM foo) SELECT * FROM bar as r JOIN (SELECT * FROM baz) AS z ON ... The WithClauseInlineView has aliases "bar"

Source from the content-addressed store, hash-verified

536
537
538class WithClauseInlineView(InlineView):
539 '''Represents the entries in a WITH clause. These are very similar to InlineViews but
540 may have an additional alias.
541
542 Ex: WITH bar AS (SELECT * FROM foo)
543 SELECT *
544 FROM bar as r
545 JOIN (SELECT * FROM baz) AS z ON ...
546
547 The WithClauseInlineView has aliases "bar" and "r" while the InlineView has
548 only the alias "z".
549
550 '''
551
552 def __init__(self, query, with_clause_alias):
553 self.query = query
554 self.with_clause_alias = with_clause_alias
555 self.alias = None
556
557 @property
558 def identifier(self):
559 return self.alias or self.with_clause_alias
560
561 def __deepcopy__(self, memo):
562 other = WithClauseInlineView(deepcopy(self.query, memo), self.with_clause_alias)
563 other.alias = self.alias
564 return other
565
566
567class JoinClause(object):

Callers 3

_create_with_clauseMethod · 0.90
__deepcopy__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected