-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomers
Description
Describe the bug
there is issue when physical plan is deserialized from bytes, it looks like the issue is with specific function, length in this case
To Reproduce
reproduction is simple:
use datafusion::prelude::{SessionContext, CsvReadOptions};
use datafusion::error::Result;
use datafusion_proto::bytes::{physical_plan_to_bytes, physical_plan_from_bytes};
let ctx = SessionContext::new();
ctx.register_csv("example", "example.csv", CsvReadOptions::default()).await?;
let logical_plan = ctx.state().create_logical_plan("select length(c0) as l from example").await?;
let physical_plan = ctx.state().create_physical_plan(&logical_plan).await?;
let blob = physical_plan_to_bytes(physical_plan)?;
// Error: Plan("There is no UDF named \"characterlength\" in the registry")
let _physical_plan = physical_plan_from_bytes(&blob, &ctx)?;error "There is no UDF named \"characterlength\" in the registry" is raised. Which is odd as length is not an udf.
wondering if characterlength should be character_length?
Expected behavior
other functions work ok, like trim:
let logical_plan = ctx.state().create_logical_plan("select trim(c0) as l from example").await?;
let physical_plan = ctx.state().create_physical_plan(&logical_plan).await?;
let blob = physical_plan_to_bytes(physical_plan)?;
let _physical_plan = physical_plan_from_bytes(&blob, &ctx)?; // All OKAdditional context
tested with datafusion, and datafusion-proto, version 23 and 24
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomers