Skip to content

Commit

Permalink
update arrow
Browse files Browse the repository at this point in the history
  • Loading branch information
ritchie46 committed Nov 25, 2021
1 parent 3cbb874 commit 05b9762
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 19 deletions.
4 changes: 2 additions & 2 deletions polars/polars-arrow/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ description = "Arrow interfaces for Polars DataFrame library"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
# arrow = { package = "arrow2", git = "https://github.com/jorgecarleitao/arrow2", rev = "70562fac652a0dab08b4b7bf3d86d2d808ea98e6", default-features = false }
arrow = { package = "arrow2", git = "https://github.com/ritchie46/arrow2", default-features = false, features = ["compute"], branch = "fn_to" }
arrow = { package = "arrow2", git = "https://github.com/jorgecarleitao/arrow2", rev = "e9a6c3ef7e1a328c298bd45e36ac2abf8ae44ebb", default-features = false }
# arrow = { package = "arrow2", git = "https://github.com/ritchie46/arrow2", default-features = false, features = ["compute"], branch = "fn_to" }
# arrow = { package = "arrow2", version = "0.7", default-features = false }
num = "^0.4"
thiserror = "^1.0"
Expand Down
4 changes: 2 additions & 2 deletions polars/polars-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@ docs-selection = [
[dependencies]
ahash = "0.7"
anyhow = "1.0"
# arrow = { package = "arrow2", git = "https://github.com/jorgecarleitao/arrow2", rev = "70562fac652a0dab08b4b7bf3d86d2d808ea98e6", default-features = false, features = ["compute"] }
arrow = { package = "arrow2", git = "https://github.com/ritchie46/arrow2", default-features = false, features = ["compute"], branch = "fn_to" }
arrow = { package = "arrow2", git = "https://github.com/jorgecarleitao/arrow2", rev = "e9a6c3ef7e1a328c298bd45e36ac2abf8ae44ebb", default-features = false, features = ["compute"] }
# arrow = { package = "arrow2", git = "https://github.com/ritchie46/arrow2", default-features = false, features = ["compute"], branch = "fn_to" }
# arrow = { package = "arrow2", version = "0.7", default-features = false, features = ["compute"] }
chrono = { version = "0.4", optional = true }
comfy-table = { version = "4.0", optional = true }
Expand Down
7 changes: 2 additions & 5 deletions polars/polars-core/src/chunked_array/arithmetic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,7 @@ fn arithmetic_helper<T, Kernel, F>(
) -> ChunkedArray<T>
where
T: PolarsNumericType,
Kernel: Fn(
&PrimitiveArray<T::Native>,
&PrimitiveArray<T::Native>,
) -> arrow::error::Result<PrimitiveArray<T::Native>>,
Kernel: Fn(&PrimitiveArray<T::Native>, &PrimitiveArray<T::Native>) -> PrimitiveArray<T::Native>,
F: Fn(T::Native, T::Native) -> T::Native,
{
let mut ca = match (lhs.len(), rhs.len()) {
Expand All @@ -72,7 +69,7 @@ where
let chunks = lhs
.downcast_iter()
.zip(rhs.downcast_iter())
.map(|(lhs, rhs)| Arc::new(kernel(lhs, rhs).expect("output")) as ArrayRef)
.map(|(lhs, rhs)| Arc::new(kernel(lhs, rhs)) as ArrayRef)
.collect();
lhs.copy_with_chunks(chunks)
}
Expand Down
4 changes: 2 additions & 2 deletions polars/polars-io/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ private = []
[dependencies]
ahash = "0.7"
anyhow = "1.0"
# arrow = { package = "arrow2", git = "https://github.com/jorgecarleitao/arrow2", rev = "70562fac652a0dab08b4b7bf3d86d2d808ea98e6", default-features = false }
arrow = { package = "arrow2", git = "https://github.com/ritchie46/arrow2", default-features = false, features = ["compute"], branch = "fn_to" }
arrow = { package = "arrow2", git = "https://github.com/jorgecarleitao/arrow2", rev = "e9a6c3ef7e1a328c298bd45e36ac2abf8ae44ebb", default-features = false }
# arrow = { package = "arrow2", git = "https://github.com/ritchie46/arrow2", default-features = false, features = ["compute"], branch = "fn_to" }
# arrow = { package = "arrow2", version = "0.7", --default-features = false }
csv-core = { version = "0.1.10", optional = true }
dirs = "4.0"
Expand Down
10 changes: 5 additions & 5 deletions polars/polars-io/src/csv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ where
// no need for 3 traling zeros
let options = write::SerializeOptions {
// 9f: all nanoseconds
time64_format: "%T%.9f".to_string(),
time64_format: Some("%T%.9f".to_string()),
// 6f: all milliseconds
timestamp_format: "%FT%H:%M:%S.%6f".to_string(),
timestamp_format: Some("%FT%H:%M:%S.%6f".to_string()),
..Default::default()
};

Expand Down Expand Up @@ -118,20 +118,20 @@ where
}

/// Set the CSV file's date format
pub fn with_date_format(mut self, format: String) -> Self {
pub fn with_date_format(mut self, format: Option<String>) -> Self {
self.options.date32_format = format;
self
}

/// Set the CSV file's time format
pub fn with_time_format(mut self, format: String) -> Self {
pub fn with_time_format(mut self, format: Option<String>) -> Self {
self.options.time32_format = format.clone();
self.options.time64_format = format;
self
}

/// Set the CSV file's timestamp format array in
pub fn with_timestamp_format(mut self, format: String) -> Self {
pub fn with_timestamp_format(mut self, format: Option<String>) -> Self {
self.options.timestamp_format = format;
self
}
Expand Down
6 changes: 3 additions & 3 deletions py-polars/Cargo.lock

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

0 comments on commit 05b9762

Please sign in to comment.