Repository navigation
Conversation
|
Note AI-generated summary. SummaryThe rule: an op that reads constants alone runs over the rows of its region, which is one row at the top level. Codegen names every other case with the existing %1, %2, %3 = db.explore_paths(%0, {}) forward hops 2 to 2
%4 = db.constant(1 : i64)
-db.output(%4) // rows guessed from the innermost loop at lowering
+%5 = db.broadcast_constant(%4, %1) // the exploration's rows, as a use
+db.output(%5)The verifier first proposed for TUR-306 was dropped. It cannot check that a broadcast names the right rows, and it rejected sources whose lowering needs a constant ( Evidence
Merge DangerDoor: two-way No format or wire change. Reverting restores the old lowering. Blast Radius: wide Every v3 query whose projection, write or raising expression reads constants alone while rows are in flight now emits a broadcast, so EXPLAIN output changes for those queries. A pass that drops or moves a row column has to keep or re-drive the broadcasts that column drives. |
9cb5980 to
439d990
Compare
|
Closing: a broadcast's driver column stands in for a relation the db dialect has no value for, and every fix after the first commit compensated for that. TUR-306 becomes the design ticket for a first-class relation value; #1176's guard stays. |
Lay every constant an op reads alone over the rows in flight with db.broadcast_constant, and run an op over constants alone on a single row.