Skip to content

Commit af17361

Browse files
authored
fix: Natural order for Int96 and Decimal96 (#28)
1 parent 2f71eda commit af17361

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

arrow/src/array/ord.rs

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ pub fn build_compare(left: &Array, right: &Array) -> Result<DynComparator> {
126126
(Int16, Int16) => compare_primitives::<Int16Type>(left, right),
127127
(Int32, Int32) => compare_primitives::<Int32Type>(left, right),
128128
(Int64, Int64) => compare_primitives::<Int64Type>(left, right),
129+
(Int96, Int96) => compare_primitives::<Int96Type>(left, right),
129130
(Int64Decimal(0), Int64Decimal(0)) => {
130131
compare_primitives::<Int64Decimal0Type>(left, right)
131132
}
@@ -147,6 +148,27 @@ pub fn build_compare(left: &Array, right: &Array) -> Result<DynComparator> {
147148
(Int64Decimal(10), Int64Decimal(10)) => {
148149
compare_primitives::<Int64Decimal10Type>(left, right)
149150
}
151+
(Int96Decimal(0), Int96Decimal(0)) => {
152+
compare_primitives::<Int96Decimal0Type>(left, right)
153+
}
154+
(Int96Decimal(1), Int96Decimal(1)) => {
155+
compare_primitives::<Int96Decimal1Type>(left, right)
156+
}
157+
(Int96Decimal(2), Int96Decimal(2)) => {
158+
compare_primitives::<Int96Decimal2Type>(left, right)
159+
}
160+
(Int96Decimal(3), Int96Decimal(3)) => {
161+
compare_primitives::<Int96Decimal3Type>(left, right)
162+
}
163+
(Int96Decimal(4), Int96Decimal(4)) => {
164+
compare_primitives::<Int96Decimal4Type>(left, right)
165+
}
166+
(Int96Decimal(5), Int96Decimal(5)) => {
167+
compare_primitives::<Int96Decimal5Type>(left, right)
168+
}
169+
(Int96Decimal(10), Int96Decimal(10)) => {
170+
compare_primitives::<Int96Decimal10Type>(left, right)
171+
}
150172
(Float32, Float32) => compare_float::<Float32Type>(left, right),
151173
(Float64, Float64) => compare_float::<Float64Type>(left, right),
152174
(Date32, Date32) => compare_primitives::<Date32Type>(left, right),

0 commit comments

Comments
 (0)