ArroyoSystems / arroyo

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

Why using intput.schema() in keyCalculationExtension? #742

Open zhuliquan opened 2 months ago

zhuliquan commented 2 months ago

I notice that schema in func output_scheame is not compatible with func schema in keyCalculationExtension.

in output_schemme, using self.input.schema() as output.

https://github.com/ArroyoSystems/arroyo/blob/4f8dc2e1b1f5acf08f3b12d0ae5896a79a6b33dc/crates/arroyo-planner/src/extension/key_calculation.rs#L112-L115

but in schema, using self.schema as output.

https://github.com/ArroyoSystems/arroyo/blob/4f8dc2e1b1f5acf08f3b12d0ae5896a79a6b33dc/crates/arroyo-planner/src/extension/key_calculation.rs#L127-L130

I notice that self.schema is not equal to self.input.schema() https://github.com/ArroyoSystems/arroyo/blob/4f8dc2e1b1f5acf08f3b12d0ae5896a79a6b33dc/crates/arroyo-planner/src/extension/key_calculation.rs#L39-L58