From 80f89454d769ead9cd0076ef0220ed193d8952ec Mon Sep 17 00:00:00 2001 From: Kevin Lim Date: Mon, 16 Dec 2024 23:09:53 -0800 Subject: [PATCH] fix(rust): Improve error message on SchemaError (#20326) --- crates/polars-core/src/series/ops/downcast.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/polars-core/src/series/ops/downcast.rs b/crates/polars-core/src/series/ops/downcast.rs index 7551cec21af..f095c512eb6 100644 --- a/crates/polars-core/src/series/ops/downcast.rs +++ b/crates/polars-core/src/series/ops/downcast.rs @@ -3,7 +3,7 @@ use crate::series::implementations::null::NullChunked; macro_rules! unpack_chunked_err { ($series:expr => $name:expr) => { - polars_err!(SchemaMismatch: "invalid series dtype: expected `{}`, got `{}`", $name, $series.dtype()) + polars_err!(SchemaMismatch: "invalid series dtype: expected `{}`, got `{}` for series with name `{}`", $name, $series.dtype(), $series.name()) }; }