Skip to content

Commit 89d706a

Browse files
committed
fix: remove todo from indexed field key
1 parent 4702915 commit 89d706a

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)