4 ms·
I would reorder round and square brackets, since I may want to filter on computed/created columns, and the ordering makes it clearer.
by boramalper 6y ago
I would reorder round and square brackets, since I may want to filter on computed/created columns, and the ordering makes it clearer.
- jhallenworld 6y agoIt's up to you (and the query optimizer can reorder), but you have to make sure the column is available when you use it. Broken up: I had: a = employee(name == "Jones") a has name, salary and age w = a[comp = salary / (age - 18)] w has comp You want: b = employee[name, comp = salary / (age - 18)] b has name and comp w = b(name == "Jones" && comp > 500) w has name and comp In one line: w = employee[name, comp = salary / (age - 18)](name == "Jones" && comp > 500)
- a1369209993 6y agoI'm not sure if you misunderstood them or I misunderstood you, but there's no legitimate reason you can't filter on computed columns as is: w = employee(name == "Jones")[comp = salary / (age - 18)](comp > 2000)