Skip to content

Commit

Permalink
Test case for ee3b0c4
Browse files Browse the repository at this point in the history
  • Loading branch information
parkervg committed Oct 9, 2024
1 parent ee3b0c4 commit d8b7d16
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions tests/test_single_table_blendsql.py
Original file line number Diff line number Diff line change
Expand Up @@ -673,5 +673,27 @@ def test_group_by_with_ingredient_alias(db, ingredients):
assert_equality(smoothie=smoothie, sql_df=sql_df)


@pytest.mark.parametrize("db", databases)
def test_null_negation(db, ingredients):
"""ee3b0c4"""
blendsql = """
SELECT merchant FROM transactions
WHERE merchant IS NOT NULL
AND {{starts_with('Z', 'transactions::merchant')}}
"""
sql = """
SELECT merchant FROM transactions
WHERE merchant IS NOT NULL
AND merchant LIKE 'Z%'
"""
smoothie = blend(
query=blendsql,
db=db,
ingredients=ingredients,
)
sql_df = db.execute_to_df(sql)
assert_equality(smoothie=smoothie, sql_df=sql_df)


if __name__ == "__main__":
pytest.main()

0 comments on commit d8b7d16

Please sign in to comment.