Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewgazelka committed Sep 27, 2024
1 parent afd282c commit 2666f19
Show file tree
Hide file tree
Showing 9 changed files with 6 additions and 11 deletions.
1 change: 0 additions & 1 deletion src/arrow2/src/array/map/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ mod iterator;
#[allow(unused)]
pub use iterator::*;

use crate::datatypes::PhysicalType;

/// An array representing a (key, value), both of arbitrary logical types.
#[derive(Clone)]
Expand Down
1 change: 0 additions & 1 deletion src/arrow2/src/array/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ pub trait Array: Send + Sync + dyn_clone::DynClone + 'static {
fn validity(&self) -> Option<&Bitmap>;

fn direct_children<'a>(&'a mut self) -> Box<dyn Iterator<Item=&'a mut dyn Array> + 'a> {
let dbg = format!("{:#?}", self.data_type());
Box::new(core::iter::empty())
}

Expand Down
2 changes: 1 addition & 1 deletion src/arrow2/src/array/struct_/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use crate::{
error::Error,
};

use super::{new_empty_array, new_null_array, Array, ToFfi};
use super::{new_empty_array, new_null_array, Array};

mod ffi;
pub(super) mod fmt;
Expand Down
4 changes: 3 additions & 1 deletion src/arrow2/src/datatypes/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,9 @@ impl DataType {
DataType::LargeBinary | DataType::Utf8 | DataType::LargeUtf8 => {}
DataType::List(field) | DataType::FixedSizeList(field, _) | DataType::LargeList(field) | DataType::Map(field, ..) => processor(&field.data_type),
DataType::Struct(fields) | DataType::Union(fields, _, _) => fields.iter().for_each(|field| processor(&field.data_type)),
DataType::Dictionary(key_type, value_type, _) => todo!(),
DataType::Dictionary(..) => {
// todo: not sure what to do here, going to just ignore for now
}
DataType::Extension(_, inner, _) => processor(inner),
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/daft-core/src/array/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ impl<T> DataArray<T> {
Logical type: {}\n\
Physical type: {}\n\
Expected Arrow physical type: {:?}\n\
Actual Arrow Logical type: {:?}\n\
Actual Arrow Logical type: {:?}
This error typically occurs when there's a discrepancy between the Daft DataType \
and the underlying Arrow representation. Please ensure that the physical type \
Expand Down
1 change: 0 additions & 1 deletion src/daft-core/src/array/ops/get.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ impl<L: DaftLogicalType> LogicalArrayImpl<L, FixedSizeListArray> {
}
}


impl_array_arrow_get!(Utf8Array, &str);
impl_array_arrow_get!(BooleanArray, bool);
impl_array_arrow_get!(BinaryArray, &[u8]);
Expand Down
2 changes: 1 addition & 1 deletion src/daft-core/src/series/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ impl Series {
pub fn validity(&self) -> Option<&arrow2::bitmap::Bitmap> {
self.inner.validity()
}

pub fn is_valid(&self, idx: usize) -> bool {
let Some(validity) = self.validity() else {
return true;
Expand Down
3 changes: 0 additions & 3 deletions src/daft-schema/src/dtype.rs
Original file line number Diff line number Diff line change
Expand Up @@ -709,6 +709,3 @@ impl From<&ImageMode> for DataType {
}
}
}

#[test]
fn tester() {}
1 change: 0 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ pub mod pylib {
fn daft(py: Python, m: &Bound<PyModule>) -> PyResult<()> {
refresh_logger(py)?;

println!("initializing");
init_tracing(crate::should_enable_chrome_trace());

common_daft_config::register_modules(m)?;
Expand Down

0 comments on commit 2666f19

Please sign in to comment.