[
https://issues.apache.org/jira/browse/IMPALA-15298?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Aleksandr Efimov updated IMPALA-15298:
--------------------------------------
Labels: substrait (was: )
> Calcite planner: export Impala's IF as a Substrait IfThen
> ---------------------------------------------------------
>
> Key: IMPALA-15298
> URL: https://issues.apache.org/jira/browse/IMPALA-15298
> Project: IMPALA
> Issue Type: Sub-task
> Components: Frontend
> Reporter: Aleksandr Efimov
> Assignee: Aleksandr Efimov
> Priority: Major
> Labels: substrait
>
> IMPALA-15297 mapped the Impala operators that stand in for functions
> Substrait already has, which took the direct harness corpus from twenty of
> twenty-four shapes to twenty-three. The one left is EXCEPT.
> Substrait models a conditional as the IfThen expression rather than as a
> function, so Impala's IF has no name for a signature to map to and needs a
> call converter instead. Isthmus does the same for Calcite's CASE, which is
> why a CASE in the query already exports while an IF does not.
> IF is not only what a user writes. ImpalaMinusToDistinctRule builds one while
> rewriting EXCEPT, so a query that never mentions IF still ends up carrying
> one, and that is what stops the EXCEPT shape.
> Add the converter. Isthmus takes converters for functions through its builder
> but assembles the call converters in a method, so this goes in by extending
> ConverterProvider and overriding getCallConverters.
> The null handling needs no special care: Impala returns the else branch when
> the condition is null, and a null condition is not true, so Substrait takes
> the else clause too.
> With this the whole harness corpus exports.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]