Skip to content

Commit

Permalink
test: add test for Table.select on literals
Browse files Browse the repository at this point in the history
  • Loading branch information
jcrist committed Feb 7, 2024
1 parent 6a017f1 commit 3fce877
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ibis/tests/expr/test_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -743,6 +743,13 @@ def test_aggregate_keywords(table):
assert_equal(expr2, expected)


def test_select_on_literals(table):
# literal ints and strings are column indices, everything else is a value
expr1 = table.select(col1=True, col2=1, col3="a")
expr2 = table.select(col1=ibis.literal(True), col2=table.b, col3=table.a)
assert expr1.equals(expr2)


def test_filter_on_literal_boolean(table):
expr1 = table.filter(True)
expr2 = table.filter(ibis.literal(True))
Expand Down

0 comments on commit 3fce877

Please sign in to comment.