ArroyoSystems / arroyo

Distributed stream processing engine in Rust
https://arroyo.dev
Apache License 2.0
3.81k stars 220 forks source link

Fix regression in updating equi-join optimization #686

Closed mwylde closed 4 months ago

mwylde commented 4 months ago

Fixes a regression that broke some updating join queries that were not being properly optimized to equijoins, leading to runtime errors like

should be able to sort: InvalidArgumentError("Sort requires at least one column") panic.file="crates/arroyo-rpc/src/df.rs" panic.line=327 panic.column=68

The primary fix is to re-enable an optimization that was disabled in #623. I have also added test cases for this class of query, and tightened up the planner checks to fail updating queries that do not include an equijoin condition (and thus could produce this runtime error).