a + b != sum([a, b])
Peewee uses operator overloads to compose expressions and queries themselves. For queries, the operators are:

* addition: UNION ALL
* bitwise or: UNION
* bitwise and: INTERSECT
* subtraction: EXCEPT

I'm not sure how the `sum` builtin is implemented but apparently it is doing something weird. You can use `reduce()` with `operator.add` instead of `sum`... Or actually maybe that's the problem, it's doing a left-fold with `0` as the initial value? The only other alternative I can think that would be appropriate would be to throw an error if a user attempts to add a query and a scalar value. This would cause `sum` (or any fold/reduce with a zero initial value) to fail, presumably, so I'm not sure that solves your problem.

In short, I think you'll need to work around this using your own iterator.
Expected behavior:
`a + b == sum([a, b])`

Actual behavior:

```
>>> a = User.select(User.id)
>>> b = News.select(News.id)
>>> a + b == sum([a, b])
False
>>> (a + b).sql()
('SELECT "t1"."id" FROM "user" AS "t1" UNION ALL SELECT "t2"."id" FROM "news" AS "t2"', [])
>>> sum([a, b]).sql()
('? UNION ALL SELECT "t1"."id" FROM "user" AS "t1" UNION ALL SELECT "t2"."id" FROM "news" AS "t2"', [0])
```

It would be A) logically consistent and B) nice for dynamic query construction if the behavior of `sum` on queries could be fixed.