Skip to content

Commit 5cb2127

Browse files
committed
Rename percision to accuracy
Signed-off-by: Adam Gutglick <adam@spiraldb.com>
1 parent 71e8d12 commit 5cb2127

47 files changed

Lines changed: 233 additions & 236 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

encodings/alp/src/alp/array.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ use std::hash::Hash;
88
use std::hash::Hasher;
99

1010
use prost::Message;
11+
use vortex_array::Accuracy;
1112
use vortex_array::Array;
1213
use vortex_array::ArrayEq;
1314
use vortex_array::ArrayHash;
@@ -19,7 +20,6 @@ use vortex_array::ArrayView;
1920
use vortex_array::ExecutionCtx;
2021
use vortex_array::ExecutionResult;
2122
use vortex_array::IntoArray;
22-
use vortex_array::Precision;
2323
use vortex_array::TypedArrayRef;
2424
use vortex_array::array_slots;
2525
use vortex_array::arrays::Primitive;
@@ -55,14 +55,14 @@ use crate::alp::rules::RULES;
5555
pub type ALPArray = Array<ALP>;
5656

5757
impl ArrayHash for ALPData {
58-
fn array_hash<H: Hasher>(&self, state: &mut H, _precision: Precision) {
58+
fn array_hash<H: Hasher>(&self, state: &mut H, _accuracy: Accuracy) {
5959
self.exponents.hash(state);
6060
self.patches_data.hash(state);
6161
}
6262
}
6363

6464
impl ArrayEq for ALPData {
65-
fn array_eq(&self, other: &Self, _precision: Precision) -> bool {
65+
fn array_eq(&self, other: &Self, _accuracy: Accuracy) -> bool {
6666
self.exponents == other.exponents && self.patches_data == other.patches_data
6767
}
6868
}

encodings/alp/src/alp_rd/array.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ use std::hash::Hasher;
99

1010
use itertools::Itertools;
1111
use prost::Message;
12+
use vortex_array::Accuracy;
1213
use vortex_array::Array;
1314
use vortex_array::ArrayEq;
1415
use vortex_array::ArrayHash;
@@ -22,7 +23,6 @@ use vortex_array::ExecutionCtx;
2223
use vortex_array::ExecutionResult;
2324
use vortex_array::IntoArray;
2425
use vortex_array::LEGACY_SESSION;
25-
use vortex_array::Precision;
2626
use vortex_array::TypedArrayRef;
2727
use vortex_array::VortexSessionExecute;
2828
use vortex_array::arrays::Primitive;
@@ -75,17 +75,17 @@ pub struct ALPRDMetadata {
7575
}
7676

7777
impl ArrayHash for ALPRDData {
78-
fn array_hash<H: Hasher>(&self, state: &mut H, precision: Precision) {
79-
self.left_parts_dictionary.array_hash(state, precision);
78+
fn array_hash<H: Hasher>(&self, state: &mut H, accuracy: Accuracy) {
79+
self.left_parts_dictionary.array_hash(state, accuracy);
8080
self.right_bit_width.hash(state);
8181
self.patches_data.hash(state);
8282
}
8383
}
8484

8585
impl ArrayEq for ALPRDData {
86-
fn array_eq(&self, other: &Self, precision: Precision) -> bool {
86+
fn array_eq(&self, other: &Self, accuracy: Accuracy) -> bool {
8787
self.left_parts_dictionary
88-
.array_eq(&other.left_parts_dictionary, precision)
88+
.array_eq(&other.left_parts_dictionary, accuracy)
8989
&& self.right_bit_width == other.right_bit_width
9090
&& self.patches_data == other.patches_data
9191
}

encodings/bytebool/src/array.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ use std::fmt::Display;
66
use std::fmt::Formatter;
77
use std::hash::Hasher;
88

9+
use vortex_array::Accuracy;
910
use vortex_array::Array;
1011
use vortex_array::ArrayEq;
1112
use vortex_array::ArrayHash;
@@ -17,7 +18,6 @@ use vortex_array::ArrayView;
1718
use vortex_array::ExecutionCtx;
1819
use vortex_array::ExecutionResult;
1920
use vortex_array::IntoArray;
20-
use vortex_array::Precision;
2121
use vortex_array::TypedArrayRef;
2222
use vortex_array::arrays::BoolArray;
2323
use vortex_array::buffer::BufferHandle;
@@ -45,14 +45,14 @@ use crate::kernel::PARENT_KERNELS;
4545
pub type ByteBoolArray = Array<ByteBool>;
4646

4747
impl ArrayHash for ByteBoolData {
48-
fn array_hash<H: Hasher>(&self, state: &mut H, precision: Precision) {
49-
self.buffer.array_hash(state, precision);
48+
fn array_hash<H: Hasher>(&self, state: &mut H, accuracy: Accuracy) {
49+
self.buffer.array_hash(state, accuracy);
5050
}
5151
}
5252

5353
impl ArrayEq for ByteBoolData {
54-
fn array_eq(&self, other: &Self, precision: Precision) -> bool {
55-
self.buffer.array_eq(&other.buffer, precision)
54+
fn array_eq(&self, other: &Self, accuracy: Accuracy) -> bool {
55+
self.buffer.array_eq(&other.buffer, accuracy)
5656
}
5757
}
5858

encodings/datetime-parts/src/array.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ use std::fmt::Formatter;
77
use std::hash::Hasher;
88

99
use prost::Message;
10+
use vortex_array::Accuracy;
1011
use vortex_array::AnyCanonical;
1112
use vortex_array::Array;
1213
use vortex_array::ArrayEq;
@@ -18,7 +19,6 @@ use vortex_array::ArrayView;
1819
use vortex_array::ExecutionCtx;
1920
use vortex_array::ExecutionResult;
2021
use vortex_array::IntoArray;
21-
use vortex_array::Precision;
2222
use vortex_array::array_slots;
2323
use vortex_array::arrays::Primitive;
2424
use vortex_array::arrays::TemporalArray;
@@ -50,11 +50,11 @@ use crate::split_temporal;
5050
pub type DateTimePartsArray = Array<DateTimeParts>;
5151

5252
impl ArrayHash for DateTimePartsData {
53-
fn array_hash<H: Hasher>(&self, _state: &mut H, _precision: Precision) {}
53+
fn array_hash<H: Hasher>(&self, _state: &mut H, _accuracy: Accuracy) {}
5454
}
5555

5656
impl ArrayEq for DateTimePartsData {
57-
fn array_eq(&self, _other: &Self, _precision: Precision) -> bool {
57+
fn array_eq(&self, _other: &Self, _accuracy: Accuracy) -> bool {
5858
true
5959
}
6060
}

encodings/decimal-byte-parts/src/decimal_byte_parts/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ mod rules;
1313
mod slice;
1414

1515
use prost::Message as _;
16+
use vortex_array::Accuracy;
1617
use vortex_array::ArrayEq;
1718
use vortex_array::ArrayHash;
1819
use vortex_array::ArrayId;
1920
use vortex_array::ArrayRef;
2021
use vortex_array::ExecutionCtx;
2122
use vortex_array::ExecutionResult;
2223
use vortex_array::IntoArray;
23-
use vortex_array::Precision;
2424
use vortex_array::TypedArrayRef;
2525
use vortex_array::arrays::DecimalArray;
2626
use vortex_array::arrays::PrimitiveArray;
@@ -53,11 +53,11 @@ use crate::decimal_byte_parts::rules::PARENT_RULES;
5353
pub type DecimalBytePartsArray = Array<DecimalByteParts>;
5454

5555
impl ArrayHash for DecimalBytePartsData {
56-
fn array_hash<H: Hasher>(&self, _state: &mut H, _precision: Precision) {}
56+
fn array_hash<H: Hasher>(&self, _state: &mut H, _accuracy: Accuracy) {}
5757
}
5858

5959
impl ArrayEq for DecimalBytePartsData {
60-
fn array_eq(&self, _other: &Self, _precision: Precision) -> bool {
60+
fn array_eq(&self, _other: &Self, _accuracy: Accuracy) -> bool {
6161
true
6262
}
6363
}

encodings/experimental/onpair/src/array.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ use std::fmt::Formatter;
77
use std::hash::Hasher;
88

99
use prost::Message as _;
10+
use vortex_array::Accuracy;
1011
use vortex_array::Array;
1112
use vortex_array::ArrayEq;
1213
use vortex_array::ArrayHash;
@@ -18,7 +19,6 @@ use vortex_array::Canonical;
1819
use vortex_array::ExecutionCtx;
1920
use vortex_array::ExecutionResult;
2021
use vortex_array::IntoArray;
21-
use vortex_array::Precision;
2222
use vortex_array::array_slots;
2323
use vortex_array::buffer::BufferHandle;
2424
use vortex_array::builders::ArrayBuilder;
@@ -196,19 +196,19 @@ impl Debug for OnPairData {
196196
}
197197

198198
impl ArrayHash for OnPairData {
199-
fn array_hash<H: Hasher>(&self, state: &mut H, precision: Precision) {
200-
self.dict_bytes.as_host().array_hash(state, precision);
199+
fn array_hash<H: Hasher>(&self, state: &mut H, accuracy: Accuracy) {
200+
self.dict_bytes.as_host().array_hash(state, accuracy);
201201
state.write_u32(self.bits);
202202
}
203203
}
204204

205205
impl ArrayEq for OnPairData {
206-
fn array_eq(&self, other: &Self, precision: Precision) -> bool {
206+
fn array_eq(&self, other: &Self, accuracy: Accuracy) -> bool {
207207
self.bits == other.bits
208208
&& self
209209
.dict_bytes
210210
.as_host()
211-
.array_eq(other.dict_bytes.as_host(), precision)
211+
.array_eq(other.dict_bytes.as_host(), accuracy)
212212
}
213213
}
214214

encodings/fastlanes/src/bitpacking/vtable/mod.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ use std::hash::Hash;
55
use std::hash::Hasher;
66

77
use prost::Message;
8+
use vortex_array::Accuracy;
89
use vortex_array::Array;
910
use vortex_array::ArrayEq;
1011
use vortex_array::ArrayHash;
@@ -16,7 +17,6 @@ use vortex_array::ArrayView;
1617
use vortex_array::ExecutionCtx;
1718
use vortex_array::ExecutionResult;
1819
use vortex_array::IntoArray;
19-
use vortex_array::Precision;
2020
use vortex_array::buffer::BufferHandle;
2121
use vortex_array::builders::ArrayBuilder;
2222
use vortex_array::dtype::DType;
@@ -69,19 +69,19 @@ pub struct BitPackedMetadata {
6969
}
7070

7171
impl ArrayHash for BitPackedData {
72-
fn array_hash<H: Hasher>(&self, state: &mut H, precision: Precision) {
72+
fn array_hash<H: Hasher>(&self, state: &mut H, accuracy: Accuracy) {
7373
self.offset.hash(state);
7474
self.bit_width.hash(state);
75-
self.packed.array_hash(state, precision);
75+
self.packed.array_hash(state, accuracy);
7676
self.patches_data.hash(state);
7777
}
7878
}
7979

8080
impl ArrayEq for BitPackedData {
81-
fn array_eq(&self, other: &Self, precision: Precision) -> bool {
81+
fn array_eq(&self, other: &Self, accuracy: Accuracy) -> bool {
8282
self.offset == other.offset
8383
&& self.bit_width == other.bit_width
84-
&& self.packed.array_eq(&other.packed, precision)
84+
&& self.packed.array_eq(&other.packed, accuracy)
8585
&& self.patches_data == other.patches_data
8686
}
8787
}

encodings/fastlanes/src/delta/vtable/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ use std::hash::Hash;
55
use std::hash::Hasher;
66

77
use prost::Message;
8+
use vortex_array::Accuracy;
89
use vortex_array::Array;
910
use vortex_array::ArrayEq;
1011
use vortex_array::ArrayHash;
@@ -15,7 +16,6 @@ use vortex_array::ArrayView;
1516
use vortex_array::ExecutionCtx;
1617
use vortex_array::ExecutionResult;
1718
use vortex_array::IntoArray;
18-
use vortex_array::Precision;
1919
use vortex_array::arrays::PrimitiveArray;
2020
use vortex_array::buffer::BufferHandle;
2121
use vortex_array::dtype::DType;
@@ -58,13 +58,13 @@ pub struct DeltaMetadata {
5858
}
5959

6060
impl ArrayHash for DeltaData {
61-
fn array_hash<H: Hasher>(&self, state: &mut H, _precision: Precision) {
61+
fn array_hash<H: Hasher>(&self, state: &mut H, _accuracy: Accuracy) {
6262
self.offset.hash(state);
6363
}
6464
}
6565

6666
impl ArrayEq for DeltaData {
67-
fn array_eq(&self, other: &Self, _precision: Precision) -> bool {
67+
fn array_eq(&self, other: &Self, _accuracy: Accuracy) -> bool {
6868
self.offset == other.offset
6969
}
7070
}

encodings/fastlanes/src/for/vtable/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ use std::fmt::Debug;
55
use std::hash::Hash;
66
use std::hash::Hasher;
77

8+
use vortex_array::Accuracy;
89
use vortex_array::Array;
910
use vortex_array::ArrayEq;
1011
use vortex_array::ArrayHash;
@@ -15,7 +16,6 @@ use vortex_array::ArrayView;
1516
use vortex_array::ExecutionCtx;
1617
use vortex_array::ExecutionResult;
1718
use vortex_array::IntoArray;
18-
use vortex_array::Precision;
1919
use vortex_array::arrays::PrimitiveArray;
2020
use vortex_array::buffer::BufferHandle;
2121
use vortex_array::dtype::DType;
@@ -50,13 +50,13 @@ mod validity;
5050
pub type FoRArray = Array<FoR>;
5151

5252
impl ArrayHash for FoRData {
53-
fn array_hash<H: Hasher>(&self, state: &mut H, _precision: Precision) {
53+
fn array_hash<H: Hasher>(&self, state: &mut H, _accuracy: Accuracy) {
5454
self.reference.hash(state);
5555
}
5656
}
5757

5858
impl ArrayEq for FoRData {
59-
fn array_eq(&self, other: &Self, _precision: Precision) -> bool {
59+
fn array_eq(&self, other: &Self, _accuracy: Accuracy) -> bool {
6060
self.reference == other.reference
6161
}
6262
}

encodings/fastlanes/src/rle/vtable/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ use std::hash::Hash;
55
use std::hash::Hasher;
66

77
use prost::Message;
8+
use vortex_array::Accuracy;
89
use vortex_array::Array;
910
use vortex_array::ArrayEq;
1011
use vortex_array::ArrayHash;
@@ -15,7 +16,6 @@ use vortex_array::ArrayView;
1516
use vortex_array::ExecutionCtx;
1617
use vortex_array::ExecutionResult;
1718
use vortex_array::IntoArray;
18-
use vortex_array::Precision;
1919
use vortex_array::arrays::Primitive;
2020
use vortex_array::buffer::BufferHandle;
2121
use vortex_array::dtype::DType;
@@ -65,13 +65,13 @@ pub struct RLEMetadata {
6565
}
6666

6767
impl ArrayHash for RLEData {
68-
fn array_hash<H: Hasher>(&self, state: &mut H, _precision: Precision) {
68+
fn array_hash<H: Hasher>(&self, state: &mut H, _accuracy: Accuracy) {
6969
self.offset.hash(state);
7070
}
7171
}
7272

7373
impl ArrayEq for RLEData {
74-
fn array_eq(&self, other: &Self, _precision: Precision) -> bool {
74+
fn array_eq(&self, other: &Self, _accuracy: Accuracy) -> bool {
7575
self.offset == other.offset
7676
}
7777
}

0 commit comments

Comments
 (0)