Closed aarondav closed 11 years ago
Thanks for the patch! A few suggested changes:
inside_budinit
, can we change the problematic meta_rewrite
code? e.g., we could have meta_rewrite call BudCollection#merge rather than <=
.Otherwise no objections.
I used the budinit thing because I wasn't sure if other people might be using <= similarly. If you're pretty sure that's the only place, or that similar cases would become obvious, I can go ahead and do that.
Other places should be obvious, I'd think (such code will just produce an error).
Removed budinit, changed meta_rewrite, updated 13 tests, added one test, and error mention now mentions <+. Of note, the changes to tests did make the notation more consistent -- the use of <= was just randomly interspersed between uses of <+.
When used on scratches/interfaces, <= will have no effect outside a bloom block. When used on tables, <= will place the tuples in, available in the next tick.
Disallowing <= loses us nothing that <+ doesn't provide, while also eliminating a user-facing corner case.
Note that inside_budinit was added, because meta_rewrite calls BudCollection <= during the rewrite phase. Otherwise, we just use inside_tick.
The error message looks like this: ../collections.rb:605:in'
<=' : illegal use of <= outside of bloom block (Bud::CompileError) from XactKVSProtocol.rb:103:in