Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion crates/core/src/expr/indexed_field.rs
Original file line numberDiff line numberDiff line change
Expand Up@@ -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(
Expand DownExpand Up@@ -68,7 +69,9 @@ impl PyGetIndexedField {
fn key(&self) -> PyResult<PyLiteral> {
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"),
),
}
}

Expand Down
Loading