substrait-io / substrait-java

Apache License 2.0
72 stars 70 forks source link

fix: map switch expression to a Calcite CASE statement #189

Closed carlyeks closed 8 months ago

carlyeks commented 8 months ago

The switch expression POJO in substrait-java doesn't contain the match expression, so I've updated the definition to include that.

To map into Calcite, I construct a CASE statement. This ends up being translated into an IfThen expression when round-tripping Substrait into Calcite.