Skip to content

Commit

Permalink
Cleanup GetIndexedField (#10769)
Browse files Browse the repository at this point in the history
* Cleanup GetIndexedField

* Generate pb

---------

Co-authored-by: Andrew Lamb <[email protected]>
  • Loading branch information
lewiszlw and alamb authored Jun 3, 2024
1 parent d3fa083 commit 826331e
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 196 deletions.
22 changes: 0 additions & 22 deletions datafusion/expr/src/expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -541,28 +541,6 @@ pub enum GetFieldAccess {
},
}

/// Returns the field of a [`ListArray`] or
/// [`StructArray`] by `key`.
///
/// See [`GetFieldAccess`] for details.
///
/// [`ListArray`]: arrow::array::ListArray
/// [`StructArray`]: arrow::array::StructArray
#[derive(Clone, PartialEq, Eq, Hash, Debug)]
pub struct GetIndexedField {
/// The expression to take the field from
pub expr: Box<Expr>,
/// The name of the field to take
pub field: GetFieldAccess,
}

impl GetIndexedField {
/// Create a new GetIndexedField expression
pub fn new(expr: Box<Expr>, field: GetFieldAccess) -> Self {
Self { expr, field }
}
}

/// Cast expression
#[derive(Clone, PartialEq, Eq, Hash, Debug)]
pub struct Cast {
Expand Down
4 changes: 2 additions & 2 deletions datafusion/expr/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ pub use aggregate_function::AggregateFunction;
pub use built_in_window_function::BuiltInWindowFunction;
pub use columnar_value::ColumnarValue;
pub use expr::{
Between, BinaryExpr, Case, Cast, Expr, GetFieldAccess, GetIndexedField, GroupingSet,
Like, Sort as SortExpr, TryCast, WindowFunctionDefinition,
Between, BinaryExpr, Case, Cast, Expr, GetFieldAccess, GroupingSet, Like,
Sort as SortExpr, TryCast, WindowFunctionDefinition,
};
pub use expr_fn::*;
pub use expr_schema::ExprSchemable;
Expand Down
9 changes: 0 additions & 9 deletions datafusion/proto/proto/datafusion.proto
Original file line number Diff line number Diff line change
Expand Up @@ -407,15 +407,6 @@ message ListRange {
LogicalExprNode stride = 3;
}

message GetIndexedField {
LogicalExprNode expr = 1;
oneof field {
NamedStructField named_struct_field = 2;
ListIndex list_index = 3;
ListRange list_range = 4;
}
}

message IsNull {
LogicalExprNode expr = 1;
}
Expand Down
142 changes: 0 additions & 142 deletions datafusion/proto/src/generated/pbjson.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 0 additions & 21 deletions datafusion/proto/src/generated/prost.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 826331e

Please sign in to comment.