fix/substrait-lambda-rextype-0.62.3+#20785
Conversation
|
perhaps we should pin version to exact as well? not sure what @gabotechs thinks |
|
I would suggest to pin version to |
|
this is duplicate of #20750 |
|
whichever PR is merged, I think the version should be pinned ( |
|
This particular release of |
|
#19692 (comment) it might affect 53 release |
|
This release of We are investigating performing |
|
I have pinned version of substrait for df.53 in #20827 if no better suggestion |
This is going to be paint point with 52.3, do you plan to yank it @benbellick ? |
|
@milenkovicm yes that is the plan right now. Unfortunately, I do not have credentials to yank that package. I have contracted the PMCs that have access and hopefully should be able to get this resolved quickly. |
Which issue does this PR close?
Rationale for this change
The substrait crate released version 0.62.3 which introduced two new
RexTypeenum variants,LambdaandLambdaInvocation, as a breaking change from 0.62.2. Since DataFusion's workspaceCargo.tomlspecifies the substrait dependency as"0.62", Cargo resolves to 0.62.3 on a clean checkout, causingdatafusion-substraitto fail to compile entirely with the following error:This means anyone building datafusion-substrait from a clean environment today will hit a hard compile failure with no workaround.
What changes are included in this PR?
Two new match arms have been added to the
from_substrait_rexfunction indatafusion/substrait/src/logical_plan/consumer/expr/mod.rsto handle the two new variants introduced in substrait 0.62.3:Both arms return
not_impl_err!with a descriptive message, which is exactly the same pattern already used in this codebase for other unsupported expression types such asNested,Enum,MultiOrList, andDynamicParameter. No existing behaviour was changed and no other files were modified.Are these changes tested?
The fix restores compilation against substrait 0.62.3. No new unit tests are added because
LambdaandLambdaInvocationare not yet supported at a functional level. Thenot_impl_err!return ensures that any Substrait plan containing these variants will produce a clean and descriptiveDataFusion error: This feature is not implementedmessage at runtime, consistent with how all other unsupported expression types in this codebase behave. The full existing test suite was run locally withcargo test -p datafusion-substraitand all existing tests continue to pass.Are there any user-facing changes?
Prior to this fix,
datafusion-substraitwould not compile at all when Cargo resolvedsubstraitto version 0.62.3. After this fix, the crate compiles correctly against 0.62.3. Any Substrait plan containing aLambdaorLambdaInvocationexpression will return a clear not-implemented error at runtime rather than a compile failure. There are no breaking API changes.