Skip to content

Commit d39592a

Browse files
committed
simplify
1 parent 7efc1bf commit d39592a

File tree

1 file changed

+2
-1
lines changed
  • spec/API_specification/examples/tpch

1 file changed

+2
-1
lines changed

spec/API_specification/examples/tpch/q5.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ def query(
4848

4949
new_column = (
5050
result.get_column_by_name("l_extendedprice")
51-
* (result.get_column_by_name("l_discount") * -1 + 1)
51+
# need the "add right operations first"
52+
* (1 - result.get_column_by_name("l_discount")) # type: ignore
5253
).rename("revenue")
5354
result = result.assign(new_column)
5455
result = result.select(["revenue", "n_name"])

0 commit comments

Comments
 (0)