Skip to content

Commit

Permalink
Updated Polars to 0.37.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ankane committed Feb 5, 2024
1 parent 4e5b029 commit f1d8444
Show file tree
Hide file tree
Showing 22 changed files with 285 additions and 183 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## 0.8.1 (unreleased)
## 0.9.0 (unreleased)

- Updated Polars to 0.37.0
- Added `schema_overrides` option to `read_database` method
- Fixed error with `BigDecimal` objects

Expand Down
110 changes: 64 additions & 46 deletions Cargo.lock

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

11 changes: 5 additions & 6 deletions ext/polars/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ ahash = "0.8"
chrono = "0.4"
either = "1.8"
magnus = "0.6"
polars-core = "=0.36.2"
polars-parquet = "=0.36.2"
polars-utils = "=0.36.2"
polars-core = "=0.37.0"
polars-parquet = "=0.37.0"
polars-utils = "=0.37.0"
serde_json = "1"
smartstring = "1"

[dependencies.polars]
version = "=0.36.2"
version = "=0.37.0"
features = [
"abs",
"approx_unique",
Expand All @@ -47,7 +47,6 @@ features = [
"ewma",
"extract_jsonpath",
"fmt",
"horizontal_concat",
"interpolate",
"ipc",
"is_first_distinct",
Expand All @@ -56,7 +55,6 @@ features = [
"is_unique",
"json",
"lazy",
"lazy_regex",
"list_count",
"list_eval",
"list_gather",
Expand All @@ -77,6 +75,7 @@ features = [
"random",
"rank",
"range",
"regex",
"reinterpret",
"repeat_by",
"rle",
Expand Down
8 changes: 4 additions & 4 deletions ext/polars/src/batched_csv.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use magnus::{prelude::*, RArray, Value};
use polars::io::mmap::MmapBytesReader;
use polars::io::RowCount;
use polars::io::RowIndex;
use polars::prelude::read_impl::OwnedBatchedCsvReader;
use polars::prelude::*;
use std::cell::RefCell;
Expand Down Expand Up @@ -46,15 +46,15 @@ impl RbBatchedCsv {
let null_values = Option::<Wrap<NullValues>>::try_convert(arguments[18])?;
let try_parse_dates = bool::try_convert(arguments[19])?;
let skip_rows_after_header = usize::try_convert(arguments[20])?;
let row_count = Option::<(String, IdxSize)>::try_convert(arguments[21])?;
let row_index = Option::<(String, IdxSize)>::try_convert(arguments[21])?;
let sample_size = usize::try_convert(arguments[22])?;
let eol_char = String::try_convert(arguments[23])?;
// end arguments

let null_values = null_values.map(|w| w.0);
let eol_char = eol_char.as_bytes()[0];

let row_count = row_count.map(|(name, offset)| RowCount { name, offset });
let row_index = row_index.map(|(name, offset)| RowIndex { name, offset });

let quote_char = if let Some(s) = quote_char {
if s.is_empty() {
Expand Down Expand Up @@ -106,7 +106,7 @@ impl RbBatchedCsv {
.with_quote_char(quote_char)
.with_end_of_line_char(eol_char)
.with_skip_rows_after_header(skip_rows_after_header)
.with_row_count(row_count)
.with_row_index(row_index)
.sample_size(sample_size);

let reader = if low_memory {
Expand Down
Loading

0 comments on commit f1d8444

Please sign in to comment.