Skip to content

Commit

Permalink
add binding for reccursive iter to python
Browse files Browse the repository at this point in the history
  • Loading branch information
samster25 committed Sep 12, 2023
1 parent 4f9be30 commit 037a84f
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 12 deletions.
6 changes: 3 additions & 3 deletions src/daft-core/src/array/ops/concat_agg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ mod test {
Field::new("foo", DataType::List(Box::new(DataType::Int64))),
Int64Array::from((
"item",
Box::new(arrow2::array::Int64Array::from_iter(vec![].iter())),
Box::new(arrow2::array::Int64Array::from_iter([].iter())),
))
.into_series(),
arrow2::offset::OffsetsBuffer::<i64>::try_from(vec![0, 0, 0, 0])?,
Expand All @@ -190,7 +190,7 @@ mod test {
Int64Array::from((
"item",
Box::new(arrow2::array::Int64Array::from_iter(
vec![Some(0), Some(1), Some(1), Some(2), None, None, Some(10000)].iter(),
[Some(0), Some(1), Some(1), Some(2), None, None, Some(10000)].iter(),
)),
))
.into_series(),
Expand Down Expand Up @@ -225,7 +225,7 @@ mod test {
Int64Array::from((
"item",
Box::new(arrow2::array::Int64Array::from_iter(
vec![
[
Some(0),
Some(0),
Some(0),
Expand Down
1 change: 0 additions & 1 deletion src/daft-io/src/object_io.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ use futures::stream::{BoxStream, Stream};
use futures::StreamExt;
use tokio::sync::mpsc::Sender;
use tokio::sync::OwnedSemaphorePermit;
use tokio::sync::Semaphore;

use crate::local::{collect_file, LocalFile};

Expand Down
8 changes: 2 additions & 6 deletions src/daft-io/src/python.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,9 @@ pub use common_io_config::python::{AzureConfig, GCSConfig, IOConfig};
pub use py::register_modules;

mod py {
use crate::{
get_io_client, get_runtime,
object_io::{recursive_iter, LSResult},
parse_url,
};
use crate::{get_io_client, get_runtime, object_io::recursive_iter, parse_url};
use common_error::DaftResult;
use futures::{StreamExt, TryStreamExt};
use futures::TryStreamExt;
use pyo3::{
prelude::*,
types::{PyDict, PyList},
Expand Down
4 changes: 2 additions & 2 deletions src/daft-plan/src/test/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use crate::{
pub fn dummy_scan_node(fields: Vec<Field>) -> LogicalPlanBuilder {
let schema = Arc::new(Schema::new(fields).unwrap());
LogicalPlanBuilder::table_scan(
FileInfos::new_internal(vec!["/foo".to_string()], vec![None], vec![None]).into(),
FileInfos::new_internal(vec!["/foo".to_string()], vec![None], vec![None]),
schema,
FileFormatConfig::Json(JsonSourceConfig {}).into(),
StorageConfig::Native(NativeStorageConfig::new_internal(None).into()).into(),
Expand All @@ -24,7 +24,7 @@ pub fn dummy_scan_node(fields: Vec<Field>) -> LogicalPlanBuilder {
pub fn dummy_scan_node_with_limit(fields: Vec<Field>, limit: Option<usize>) -> LogicalPlanBuilder {
let schema = Arc::new(Schema::new(fields).unwrap());
LogicalPlanBuilder::table_scan_with_limit(
FileInfos::new_internal(vec!["/foo".to_string()], vec![None], vec![None]).into(),
FileInfos::new_internal(vec!["/foo".to_string()], vec![None], vec![None]),
schema,
FileFormatConfig::Json(JsonSourceConfig {}).into(),
StorageConfig::Native(NativeStorageConfig::new_internal(None).into()).into(),
Expand Down

0 comments on commit 037a84f

Please sign in to comment.