示例#1
0
文件: relations.py 项目: cpcloud/ibis
    def view(self) -> TableExpr:
        """Create a new table expression distinct from the current one.

        Use this API for any self-referencing operations like a self-join.

        Returns
        -------
        TableExpr
            Table expression
        """
        from .. import operations as ops

        return ops.SelfReference(self).to_expr()
示例#2
0
文件: api.py 项目: keflavich/ibis
def _table_view(self):
    """
    Create a new table expression that is semantically equivalent to the
    current one, but is considered a distinct relation for evaluation
    purposes (e.g. in SQL).

    For doing any self-referencing operations, like a self-join, you will
    use this operation to create a reference to the current table
    expression.

    Returns
    -------
    expr : TableExpr
    """
    return TableExpr(_ops.SelfReference(self))