Skip to content

Commit 5a28b02

Browse files
authored
feat: support Identity in pruner (#1441)
1 parent a231494 commit 5a28b02

File tree

2 files changed

+203
-59
lines changed

2 files changed

+203
-59
lines changed

vortex-expr/src/identity.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,21 @@
11
use std::any::Any;
22
use std::fmt::Display;
3+
use std::sync::Arc;
34

45
use vortex_array::ArrayData;
56
use vortex_error::VortexResult;
67

7-
use crate::{unbox_any, VortexExpr};
8+
use crate::{unbox_any, ExprRef, VortexExpr};
89

910
#[derive(Debug, Eq, PartialEq)]
1011
pub struct Identity;
1112

13+
impl Identity {
14+
pub fn new_expr() -> ExprRef {
15+
Arc::new(Identity)
16+
}
17+
}
18+
1219
impl Display for Identity {
1320
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1421
write!(f, "[]")

0 commit comments

Comments
 (0)