Skip to content

NULL::<Data type> can't be encode to substrait #15855

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
discord9 opened this issue Apr 25, 2025 · 0 comments · May be fixed by #15854
Open

NULL::<Data type> can't be encode to substrait #15855

discord9 opened this issue Apr 25, 2025 · 0 comments · May be fixed by #15854
Labels
bug Something isn't working

Comments

@discord9
Copy link

Describe the bug

as title, NULL::<Data type> can't be encode to substrait, WIP fix in #15854

To Reproduce

try run this unit test:

#[tokio::test]
    async fn fold_cast_null(){
        let state = SessionStateBuilder::default().build();
        let empty_schema = DFSchemaRef::new(DFSchema::empty());
        let field = Field::new("out", DataType::Int32, false);

        let expr = Expr::Literal(ScalarValue::Null).cast_to(&DataType::Int32, &empty_schema).unwrap();
    
        let typed_null =to_substrait_extended_expr(&[(&expr, &field)], &empty_schema, &state).unwrap();
}

and it will fail with "Null cast is invalid" or something

Expected behavior

No response

Additional context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant