Skip to content

Commit aeb9a41

Browse files
committed
update name
1 parent 2e264e3 commit aeb9a41

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

connectorx-python/src/pandas/pandas_columns/array.rs

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,15 @@ impl<'a, V> FromPyObject<'a> for ArrayBlock<'a, V> {
4444

4545
impl<'a, V> ArrayBlock<'a, V> {
4646
#[throws(ConnectorXPythonError)]
47-
pub fn split(self) -> Vec<FloatArrayColumn<'a, V>> {
47+
pub fn split(self) -> Vec<ArrayColumn<'a, V>> {
4848
let mut ret = vec![];
4949
let mut view = self.data;
5050

5151
let nrows = view.ncols();
5252
while view.nrows() > 0 {
5353
let (col, rest) = view.split_at(Axis(0), 1);
5454
view = rest;
55-
ret.push(FloatArrayColumn::<V> {
55+
ret.push(ArrayColumn::<V> {
5656
data: col
5757
.into_shape(nrows)?
5858
.into_slice()
@@ -68,7 +68,7 @@ impl<'a, V> ArrayBlock<'a, V> {
6868
}
6969
}
7070

71-
pub struct FloatArrayColumn<'a, V> {
71+
pub struct ArrayColumn<'a, V> {
7272
data: &'a mut [PyList],
7373
next_write: usize,
7474
buffer: Vec<V>,
@@ -77,7 +77,7 @@ pub struct FloatArrayColumn<'a, V> {
7777
mutex: Arc<Mutex<()>>,
7878
}
7979

80-
impl<'a, V> PandasColumnObject for FloatArrayColumn<'a, V>
80+
impl<'a, V> PandasColumnObject for ArrayColumn<'a, V>
8181
where
8282
V: Send + ToPyObject,
8383
{
@@ -97,7 +97,7 @@ where
9797
}
9898
}
9999

100-
impl<'a> PandasColumn<Vec<f64>> for FloatArrayColumn<'a, f64> {
100+
impl<'a> PandasColumn<Vec<f64>> for ArrayColumn<'a, f64> {
101101
#[throws(ConnectorXPythonError)]
102102
fn write(&mut self, val: Vec<f64>) {
103103
self.lengths.push(val.len());
@@ -106,7 +106,7 @@ impl<'a> PandasColumn<Vec<f64>> for FloatArrayColumn<'a, f64> {
106106
}
107107
}
108108

109-
impl<'a> PandasColumn<Option<Vec<f64>>> for FloatArrayColumn<'a, f64> {
109+
impl<'a> PandasColumn<Option<Vec<f64>>> for ArrayColumn<'a, f64> {
110110
#[throws(ConnectorXPythonError)]
111111
fn write(&mut self, val: Option<Vec<f64>>) {
112112
match val {
@@ -122,7 +122,7 @@ impl<'a> PandasColumn<Option<Vec<f64>>> for FloatArrayColumn<'a, f64> {
122122
}
123123
}
124124

125-
impl<'a> PandasColumn<Vec<i64>> for FloatArrayColumn<'a, i64> {
125+
impl<'a> PandasColumn<Vec<i64>> for ArrayColumn<'a, i64> {
126126
#[throws(ConnectorXPythonError)]
127127
fn write(&mut self, val: Vec<i64>) {
128128
self.lengths.push(val.len());
@@ -131,7 +131,7 @@ impl<'a> PandasColumn<Vec<i64>> for FloatArrayColumn<'a, i64> {
131131
}
132132
}
133133

134-
impl<'a> PandasColumn<Option<Vec<i64>>> for FloatArrayColumn<'a, i64> {
134+
impl<'a> PandasColumn<Option<Vec<i64>>> for ArrayColumn<'a, i64> {
135135
#[throws(ConnectorXPythonError)]
136136
fn write(&mut self, val: Option<Vec<i64>>) {
137137
match val {
@@ -148,32 +148,32 @@ impl<'a> PandasColumn<Option<Vec<i64>>> for FloatArrayColumn<'a, i64> {
148148
}
149149

150150
impl HasPandasColumn for Vec<f64> {
151-
type PandasColumn<'a> = FloatArrayColumn<'a, f64>;
151+
type PandasColumn<'a> = ArrayColumn<'a, f64>;
152152
}
153153

154154
impl HasPandasColumn for Option<Vec<f64>> {
155-
type PandasColumn<'a> = FloatArrayColumn<'a, f64>;
155+
type PandasColumn<'a> = ArrayColumn<'a, f64>;
156156
}
157157

158158
impl HasPandasColumn for Vec<i64> {
159-
type PandasColumn<'a> = FloatArrayColumn<'a, i64>;
159+
type PandasColumn<'a> = ArrayColumn<'a, i64>;
160160
}
161161

162162
impl HasPandasColumn for Option<Vec<i64>> {
163-
type PandasColumn<'a> = FloatArrayColumn<'a, i64>;
163+
type PandasColumn<'a> = ArrayColumn<'a, i64>;
164164
}
165-
impl<'a, V> FloatArrayColumn<'a, V>
165+
impl<'a, V> ArrayColumn<'a, V>
166166
where
167167
V: Send + ToPyObject,
168168
{
169-
pub fn partition(self, counts: &[usize]) -> Vec<FloatArrayColumn<'a, V>> {
169+
pub fn partition(self, counts: &[usize]) -> Vec<ArrayColumn<'a, V>> {
170170
let mut partitions = vec![];
171171
let mut data = self.data;
172172

173173
for &c in counts {
174174
let (splitted, rest) = data.split_at_mut(c);
175175
data = rest;
176-
partitions.push(FloatArrayColumn {
176+
partitions.push(ArrayColumn {
177177
data: splitted,
178178
next_write: 0,
179179
lengths: vec![],

connectorx-python/src/pandas/pandas_columns/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ mod string;
88
// TODO: use macro for integers
99

1010
use crate::errors::Result;
11-
pub use crate::pandas::pandas_columns::array::{ArrayBlock, FloatArrayColumn, PyList};
11+
pub use crate::pandas::pandas_columns::array::{ArrayBlock, ArrayColumn, PyList};
1212
pub use crate::pandas::pandas_columns::bytes::{BytesBlock, BytesColumn, PyBytes};
1313
pub use boolean::{BooleanBlock, BooleanColumn};
1414
pub use datetime::{DateTimeBlock, DateTimeColumn};

0 commit comments

Comments
 (0)