Skip to content

Commit

Permalink
fix bigidx
Browse files Browse the repository at this point in the history
  • Loading branch information
ritchie46 committed May 8, 2022
1 parent 3a0e303 commit 17de773
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions py-polars/src/dataframe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ impl PyDataFrame {
null_values: Option<Wrap<NullValues>>,
parse_dates: bool,
skip_rows_after_header: usize,
row_count: Option<(String, u32)>,
row_count: Option<(String, IdxSize)>,
sample_size: usize,
) -> PyResult<Self> {
let null_values = null_values.map(|w| w.0);
Expand Down Expand Up @@ -189,7 +189,7 @@ impl PyDataFrame {
projection: Option<Vec<usize>>,
n_rows: Option<usize>,
parallel: bool,
row_count: Option<(String, u32)>,
row_count: Option<(String, IdxSize)>,
) -> PyResult<Self> {
use EitherRustPythonFile::*;

Expand Down Expand Up @@ -224,7 +224,7 @@ impl PyDataFrame {
columns: Option<Vec<String>>,
projection: Option<Vec<usize>>,
n_rows: Option<usize>,
row_count: Option<(String, u32)>,
row_count: Option<(String, IdxSize)>,
) -> PyResult<Self> {
let row_count = row_count.map(|(name, offset)| RowCount { name, offset });
let file = get_file_like(py_f, false)?;
Expand Down Expand Up @@ -995,7 +995,7 @@ impl PyDataFrame {
}
}

pub fn with_row_count(&self, name: &str, offset: Option<u32>) -> PyResult<Self> {
pub fn with_row_count(&self, name: &str, offset: Option<IdxSize>) -> PyResult<Self> {
let df = self
.df
.with_row_count(name, offset)
Expand Down
8 changes: 4 additions & 4 deletions py-polars/src/lazy/dataframe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ impl PyLazyFrame {
rechunk: bool,
skip_rows_after_header: usize,
encoding: &str,
row_count: Option<(String, u32)>,
row_count: Option<(String, IdxSize)>,
parse_dates: bool,
) -> PyResult<Self> {
let null_values = null_values.map(|w| w.0);
Expand Down Expand Up @@ -223,7 +223,7 @@ impl PyLazyFrame {
cache: bool,
parallel: bool,
rechunk: bool,
row_count: Option<(String, u32)>,
row_count: Option<(String, IdxSize)>,
) -> PyResult<Self> {
let row_count = row_count.map(|(name, offset)| RowCount { name, offset });
let args = ScanArgsParquet {
Expand All @@ -243,7 +243,7 @@ impl PyLazyFrame {
n_rows: Option<usize>,
cache: bool,
rechunk: bool,
row_count: Option<(String, u32)>,
row_count: Option<(String, IdxSize)>,
) -> PyResult<Self> {
let row_count = row_count.map(|(name, offset)| RowCount { name, offset });
let args = ScanArgsIpc {
Expand Down Expand Up @@ -663,7 +663,7 @@ impl PyLazyFrame {
ldf.melt(args).into()
}

pub fn with_row_count(&self, name: &str, offset: Option<u32>) -> Self {
pub fn with_row_count(&self, name: &str, offset: Option<IdxSize>) -> Self {
let ldf = self.ldf.clone();
ldf.with_row_count(name, offset).into()
}
Expand Down

0 comments on commit 17de773

Please sign in to comment.