Skip to content

Commit 41eadc4

Browse files
authored
fix: remove todo from indexed field key (#1667)
Co-authored-by: BharatDeva <278575558+BharatDeva@users.noreply.github.com>
1 parent 59c1fd1 commit 41eadc4

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎crates/core/src/expr/indexed_field.rs‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ use datafusion::logical_expr::expr::{GetFieldAccess, GetIndexedField};
2121
use pyo3::prelude::*;
2222

2323
use super::literal::PyLiteral;
24+
use crate::errors::py_unsupported_variant_err;
2425
use crate::expr::PyExpr;
2526

2627
#[pyclass(
@@ -68,7 +69,9 @@ impl PyGetIndexedField {
6869
fn key(&self) -> PyResult<PyLiteral> {
6970
match &self.indexed_field.field {
7071
GetFieldAccess::NamedStructField { name, .. } => Ok(name.clone().into()),
71-
_ => todo!(),
72+
GetFieldAccess::ListIndex { .. } | GetFieldAccess::ListRange { .. } => Err(
73+
py_unsupported_variant_err("GetIndexedField.key is only supported for struct fields"),
74+
),
7275
}
7376
}
7477

0 commit comments

Comments
 (0)