Skip to content

Commit

Permalink
refactor: add type annotations to set operation functions
Browse files Browse the repository at this point in the history
  • Loading branch information
jcrist authored and cpcloud committed Sep 28, 2023
1 parent c0085be commit 13f593b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ibis/expr/api.py
Expand Up @@ -1531,7 +1531,7 @@ def trailing_range_window(preceding, order_by, group_by=None):
)


def union(table: ir.Table, *rest: ir.Table, distinct: bool = False):
def union(table: ir.Table, *rest: ir.Table, distinct: bool = False) -> ir.Table:
"""Compute the set union of multiple table expressions.
The input tables must have identical schemas.
Expand Down Expand Up @@ -1599,7 +1599,7 @@ def union(table: ir.Table, *rest: ir.Table, distinct: bool = False):
return table.union(*rest, distinct=distinct) if rest else table


def intersect(table: ir.Table, *rest: ir.Table, distinct: bool = True):
def intersect(table: ir.Table, *rest: ir.Table, distinct: bool = True) -> ir.Table:
"""Compute the set intersection of multiple table expressions.
The input tables must have identical schemas.
Expand Down Expand Up @@ -1654,7 +1654,7 @@ def intersect(table: ir.Table, *rest: ir.Table, distinct: bool = True):
return table.intersect(*rest, distinct=distinct) if rest else table


def difference(table: ir.Table, *rest: ir.Table, distinct: bool = True):
def difference(table: ir.Table, *rest: ir.Table, distinct: bool = True) -> ir.Table:
"""Compute the set difference of multiple table expressions.
The input tables must have identical schemas.
Expand Down

0 comments on commit 13f593b

Please sign in to comment.