From 89d706a5318a04ea1e3a46d8b6cbd2ed64c0f03e Mon Sep 17 00:00:00 2001 From: BharatDeva <278575558+BharatDeva@users.noreply.github.com> Date: Wed, 5 Aug 2026 09:38:38 -0500 Subject: [PATCH] fix: remove todo from indexed field key --- crates/core/src/expr/indexed_field.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/crates/core/src/expr/indexed_field.rs b/crates/core/src/expr/indexed_field.rs index 98a90d8d4..c980b0f92 100644 --- a/crates/core/src/expr/indexed_field.rs +++ b/crates/core/src/expr/indexed_field.rs @@ -21,6 +21,7 @@ use datafusion::logical_expr::expr::{GetFieldAccess, GetIndexedField}; use pyo3::prelude::*; use super::literal::PyLiteral; +use crate::errors::py_unsupported_variant_err; use crate::expr::PyExpr; #[pyclass( @@ -68,7 +69,9 @@ impl PyGetIndexedField { fn key(&self) -> PyResult { match &self.indexed_field.field { GetFieldAccess::NamedStructField { name, .. } => Ok(name.clone().into()), - _ => todo!(), + GetFieldAccess::ListIndex { .. } | GetFieldAccess::ListRange { .. } => Err( + py_unsupported_variant_err("GetIndexedField.key is only supported for struct fields"), + ), } }