Skip to content

Commit

Permalink
remove many
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewgazelka committed Sep 27, 2024
1 parent 41edc93 commit e063b04
Show file tree
Hide file tree
Showing 11 changed files with 31 additions and 283 deletions.
1 change: 0 additions & 1 deletion Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ tokio = {version = "1.37.0", features = [
]}
tokio-stream = {version = "0.1.14", features = ["fs", "io-util", "time"]}
tokio-util = "0.7.11"
tracing = "0.1.40"
tracing = "0.1"
url = "2.4.0"

[workspace.dependencies.arrow2]
Expand Down
82 changes: 0 additions & 82 deletions py-polars/debug/launch.py

This file was deleted.

106 changes: 0 additions & 106 deletions something.py

This file was deleted.

1 change: 0 additions & 1 deletion src/daft-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ pyo3 = {workspace = true, optional = true}
regex = {workspace = true}
serde = {workspace = true}
sketches-ddsketch = {workspace = true}
tracing = {workspace = true}
unicode-normalization = "0.1.23"

[dependencies.numpy]
Expand Down
6 changes: 0 additions & 6 deletions src/daft-core/src/array/ops/from_arrow.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use std::sync::Arc;

use common_error::{DaftError, DaftResult};
use log::info;

use crate::{
array::{DataArray, FixedSizeListArray, ListArray, StructArray},
Expand Down Expand Up @@ -30,15 +29,12 @@ impl<L: DaftLogicalType> FromArrow for LogicalArray<L>
where
<L::PhysicalType as DaftDataType>::ArrayType: FromArrow,
{
#[tracing::instrument(level = "trace", name = "LogicalArray::from_arrow", skip_all)]
fn from_arrow(field: FieldRef, arrow_arr: Box<dyn arrow2::array::Array>) -> DaftResult<Self> {
let target_convert = field.to_physical();
let target_convert_arrow = target_convert.dtype.to_arrow()?;

let physical_arrow_array = arrow_arr.convert_logical_type(target_convert_arrow.clone());

let dbg = format!("Target Convert: {target_convert:#?}\nTarget Convert Arrow: {target_convert_arrow:#?}\nPhysical Arrow: {:#?}", physical_arrow_array.data_type());

let physical = <L::PhysicalType as DaftDataType>::ArrayType::from_arrow(
Arc::new(target_convert),
physical_arrow_array,
Expand Down Expand Up @@ -132,8 +128,6 @@ impl FromArrow for StructArray {
return Err(DaftError::ValueError(format!("Attempting to create Daft StructArray with {} fields from Arrow array with {} fields: {} vs {:?}", fields.len(), arrow_fields.len(), &field.dtype, arrow_arr.data_type())));
}

let debug = format!("{field:#?}");

let arrow_arr = arrow_arr.as_ref().as_any().downcast_ref::<arrow2::array::StructArray>().unwrap();
let arrow_child_arrays = arrow_arr.values();

Expand Down
1 change: 0 additions & 1 deletion src/daft-core/src/series/from.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ impl Series {
impl TryFrom<(&str, Box<dyn arrow2::array::Array>)> for Series {
type Error = DaftError;

#[instrument(level = "trace", name = "Series::try_from", skip_all)]
fn try_from((name, array): (&str, Box<dyn arrow2::array::Array>)) -> DaftResult<Self> {
let source_arrow_type: &ArrowDataType = array.data_type();
let dtype = DaftDataType::from(source_arrow_type);
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 @@ -618,9 +618,7 @@ impl DataType {
}

impl From<&ArrowType> for DataType {
#[tracing::instrument(level = "trace", name = "DataType::from(&ArrowType)", skip(item))]
fn from(item: &ArrowType) -> Self {
tracing::trace!("processing {item:#?}");
let result = match item {
ArrowType::Null => Self::Null,
ArrowType::Boolean => Self::Boolean,
Expand Down Expand Up @@ -697,7 +695,6 @@ impl From<&ArrowType> for DataType {
_ => panic!("DataType :{item:?} is not supported"),
};

tracing::info!("Result: {result:?}");
result
}
}
Expand Down
13 changes: 0 additions & 13 deletions tests/expressions/test_expressions.py
Original file line number Diff line number Diff line change
Expand Up @@ -516,16 +516,6 @@ def test_list_value_counts():
{"list_col": [["a", "b", "a", "c"], ["b", "b", "c"], ["a", "a", "a"], [], ["d", None, "d"]]}
)

# mp = MicroPartition.from_pydict({
# "list_col": [
# ["a", "b", "a", "c"],
# ["b", "b", "c"],
# ["a", "a", "a"],
# [],
# ["d", "d"]
# ]
# })

# # Apply list_value_counts operation
result = mp.eval_expression_list([col("list_col").list.value_counts().alias("value_counts")])
value_counts = result.to_pydict()["value_counts"]
Expand All @@ -536,9 +526,6 @@ def test_list_value_counts():
# Check the result
assert value_counts == expected

# Test with empty input
empty_mp = MicroPartition.from_pydict({"list_col": []})

# Test with empty input (no proper type -> should raise error)
empty_mp = MicroPartition.from_pydict({"list_col": []})
with pytest.raises(ValueError):
Expand Down
Loading

0 comments on commit e063b04

Please sign in to comment.