Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
6333d79
preliminary changes
CurtHagenlocher Oct 19, 2024
b653b9b
small fixes
CurtHagenlocher Oct 31, 2024
b6267c6
Merge branch 'master' of https://github.com/CurtHagenlocher/arrow-rs …
CurtHagenlocher Dec 18, 2024
490bfc8
more support
CurtHagenlocher Dec 18, 2024
3e860ec
More support for decimal32 and decimal64
CurtHagenlocher Dec 28, 2024
20ec84e
Add Field::with_dict_is_ordered (#6885)
alamb Dec 18, 2024
9daab33
Minor: make it easier to find fix instructions when `cargo fmt` on pa…
alamb Dec 18, 2024
9a4ccd1
Minor: add comments explaining bad MSRV, output in json (#6857)
alamb Dec 18, 2024
77e92b2
Add 53.4.0 to release schedule (#6896)
alamb Dec 18, 2024
63f5d5e
Add deprecation / API removal policy (#6852)
alamb Dec 18, 2024
b8cc13e
Enable string-based column projections from Parquet files (#6871)
etseidl Dec 18, 2024
1e582ad
doc: add comment for timezone string (#6899)
xxchan Dec 18, 2024
4c2b75b
Update version to 54.0.0, add CHANGELOG (#6894)
alamb Dec 19, 2024
5f01ed4
[object store] Add planned release schedule (#6904)
alamb Dec 19, 2024
f6eaca5
add `extend_dictionary` in dictionary builder for improved performanc…
rluvaton Dec 19, 2024
02377a0
[object_store]: Version and Changelog for 0.11.2 (#6908)
alamb Dec 20, 2024
d9885da
feat(parquet): Add next_row_group API for ParquetRecordBatchStream (#…
Xuanwo Dec 24, 2024
7ef432b
chore(arrow-ord): move `can_rank` to the `rank` file (#6910)
rluvaton Dec 26, 2024
df87b13
preliminary changes
CurtHagenlocher Oct 19, 2024
78c899f
Decimal32/64 mostly done
CurtHagenlocher Jan 13, 2025
48d5b44
Fix error message typos with Parquet compression (#6918)
orf Dec 29, 2024
3b96eaa
chore: expose arrow-schema methods, for use when writing parquet outs…
wiedld Dec 30, 2024
bf24a30
Improve error message for unsupported cast between struct and other t…
takaebato Dec 30, 2024
d58348d
[arrow-string] Implement string view support for `regexp_match` (#6849)
tlm365 Dec 30, 2024
8880bde
Add doctest example for `Buffer::from_bytes` (#6920)
kylebarron Jan 1, 2025
7289a99
object_store: Add enabled-by-default "fs" feature (#6636)
Turbo87 Jan 2, 2025
95dae6a
object_store: Migrate from `snafu` to `thiserror` (#6266)
Turbo87 Jan 2, 2025
debd2e8
feat: add GenericListViewBuilder (#6552)
Kikkon Jan 3, 2025
d31e780
Update itertools requirement from 0.13.0 to 0.14.0 in /object_store (…
dependabot[bot] Jan 3, 2025
e4989aa
Document how to use Extend for generic methods on ArrayBuilders (#6932)
wiedld Jan 4, 2025
ce4be76
[Parquet] Add projection utility functions (#6931)
XiangpengHao Jan 4, 2025
94a079f
feat(arrow-select): `concat` kernel will merge dictionary values for …
rluvaton Jan 4, 2025
91e9380
remove println (#6935)
himadripal Jan 4, 2025
005bfe8
Minor: improve `zip` kernel docs, add examples (#6928)
alamb Jan 4, 2025
496de66
Minor clippy fixes (#6942)
psvri Jan 5, 2025
30f46c7
Improve `Buffer` documentation, deprecate `Buffer::from_bytes` add `F…
alamb Jan 6, 2025
618d81c
Convert some panics that happen on invalid parquet files to error res…
jp0317 Jan 6, 2025
1be3077
Update MSRVs to be accurate (#6742)
itsjunetime Jan 6, 2025
70e1054
Document the `ParquetRecordBatchStream` buffering (#6947)
alamb Jan 8, 2025
06b4b8f
Return `BoxStream` with `'static` lifetime from `ObjectStore::list` (…
kylebarron Jan 8, 2025
a89585d
[Parquet] Reuse buffer in `ByteViewArrayDecoderPlain` (#6930)
XiangpengHao Jan 8, 2025
6761bab
regenerate arrow-ipc/src/gen with patched flatbuffers (#6426)
bkietz Jan 8, 2025
dd9d294
[Parquet] Add benchmark and test for writing NaNs to Parquet (#6955)
adamreeve Jan 8, 2025
87624a7
Add `peek_next_page_offset` to `SerializedPageReader` (#6945)
XiangpengHao Jan 9, 2025
2dffbe4
Fix CI for Rust 1.84 release (#6963)
alamb Jan 10, 2025
1710c87
Improve `ParquetRecordBatchStreamBuilder` docs / examples (#6948)
alamb Jan 10, 2025
b265b62
[Parquet] Improve speed of dictionary encoding NaN float values (#6953)
adamreeve Jan 11, 2025
d546350
preliminary changes
CurtHagenlocher Oct 19, 2024
b53a8b4
preliminary changes
CurtHagenlocher Oct 19, 2024
ba830a4
Decimal32/64 mostly done
CurtHagenlocher Jan 13, 2025
2fdddf4
Small changes
CurtHagenlocher Jan 21, 2025
f18feed
Merge branch 'main' of https://github.com/CurtHagenlocher/arrow-rs in…
CurtHagenlocher Jan 22, 2025
691cb4f
Alphabetize using
CurtHagenlocher Jan 22, 2025
b264768
Merge branch 'main' of https://github.com/CurtHagenlocher/arrow-rs in…
CurtHagenlocher Feb 1, 2025
0f4df67
Cleanup and fixes
CurtHagenlocher Feb 1, 2025
c0a73de
Mollify clippy
CurtHagenlocher Feb 1, 2025
495a193
Formatting changes
CurtHagenlocher Feb 1, 2025
a0c70f2
Fix typo
CurtHagenlocher Feb 1, 2025
8e599cf
parquet dict support
CurtHagenlocher Feb 3, 2025
605c99e
simplifications
CurtHagenlocher Mar 19, 2025
c7e0960
Implement Type and Array for Decimal32 and Decimal64
CurtHagenlocher Feb 8, 2025
58dd007
Fix formatting
CurtHagenlocher Feb 8, 2025
81bb8be
Merge remote-tracking branch 'upstream/main' into Decimal3264TypeArray
CurtHagenlocher Mar 22, 2025
ccadb4f
Re-added new types to builder
CurtHagenlocher Mar 22, 2025
af2d62d
Merge branch 'Decimal3264TypeArray' of https://github.com/CurtHagenlo…
CurtHagenlocher Jun 28, 2025
d62af6b
Fixes
CurtHagenlocher Jun 28, 2025
1d5932a
Merge branch 'main' of https://github.com/CurtHagenlocher/arrow-rs in…
CurtHagenlocher Jun 28, 2025
088775d
fix build break
CurtHagenlocher Jun 28, 2025
ed22dea
Implement cast and other operations on decimal32 and decimal64
CurtHagenlocher Jun 28, 2025
a2bd773
Fix clippy
CurtHagenlocher Jun 29, 2025
43a5356
Fix clippy
CurtHagenlocher Jun 29, 2025
a87c826
Fix clippy
CurtHagenlocher Jun 29, 2025
da9a0d4
Fix format issues
CurtHagenlocher Jun 29, 2025
e1ee601
Merge branch 'decimal3264' of https://github.com/CurtHagenlocher/arro…
CurtHagenlocher Jul 1, 2025
fe3b5ff
Merge branch 'main' of https://github.com/CurtHagenlocher/arrow-rs in…
CurtHagenlocher Jul 1, 2025
279e91a
Merge branch 'decimal3264_operations' of https://github.com/CurtHagen…
CurtHagenlocher Jul 1, 2025
6667162
fix format
CurtHagenlocher Jul 1, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions arrow-array/src/cast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1132,6 +1132,18 @@ mod tests {
assert!(!as_string_array(&array).is_empty())
}

#[test]
fn test_decimal32array() {
let a = Decimal32Array::from_iter_values([1, 2, 4, 5]);
assert!(!as_primitive_array::<Decimal32Type>(&a).is_empty());
}

#[test]
fn test_decimal64array() {
let a = Decimal64Array::from_iter_values([1, 2, 4, 5]);
assert!(!as_primitive_array::<Decimal64Type>(&a).is_empty());
}

#[test]
fn test_decimal128array() {
let a = Decimal128Array::from_iter_values([1, 2, 4, 5]);
Expand Down
2 changes: 2 additions & 0 deletions arrow-array/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1826,6 +1826,8 @@ mod tests {
test_layout::<Float16Type>();
test_layout::<Float32Type>();
test_layout::<Float64Type>();
test_layout::<Decimal32Type>();
test_layout::<Decimal64Type>();
test_layout::<Decimal128Type>();
test_layout::<Decimal256Type>();
test_layout::<TimestampNanosecondType>();
Expand Down
72 changes: 72 additions & 0 deletions arrow-cast/src/cast/decimal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ use crate::cast::*;
/// A utility trait that provides checked conversions between
/// decimal types inspired by [`NumCast`]
pub(crate) trait DecimalCast: Sized {
fn to_i32(self) -> Option<i32>;

fn to_i64(self) -> Option<i64>;

fn to_i128(self) -> Option<i128>;

fn to_i256(self) -> Option<i256>;
Expand All @@ -29,7 +33,67 @@ pub(crate) trait DecimalCast: Sized {
fn from_f64(n: f64) -> Option<Self>;
}

impl DecimalCast for i32 {
fn to_i32(self) -> Option<i32> {
Some(self)
}

fn to_i64(self) -> Option<i64> {
Some(self as i64)
}

fn to_i128(self) -> Option<i128> {
Some(self as i128)
}

fn to_i256(self) -> Option<i256> {
Some(i256::from_i128(self as i128))
}

fn from_decimal<T: DecimalCast>(n: T) -> Option<Self> {
n.to_i32()
}

fn from_f64(n: f64) -> Option<Self> {
n.to_i32()
}
}

impl DecimalCast for i64 {
fn to_i32(self) -> Option<i32> {
Some(self as i32)
}

fn to_i64(self) -> Option<i64> {
Some(self)
}

fn to_i128(self) -> Option<i128> {
Some(self as i128)
}

fn to_i256(self) -> Option<i256> {
Some(i256::from_i128(self as i128))
}

fn from_decimal<T: DecimalCast>(n: T) -> Option<Self> {
n.to_i64()
}

fn from_f64(n: f64) -> Option<Self> {
n.to_i64()
}
}

impl DecimalCast for i128 {
fn to_i32(self) -> Option<i32> {
Some(self as i32)
}

fn to_i64(self) -> Option<i64> {
Some(self as i64)
}

fn to_i128(self) -> Option<i128> {
Some(self)
}
Expand All @@ -48,6 +112,14 @@ impl DecimalCast for i128 {
}

impl DecimalCast for i256 {
fn to_i32(self) -> Option<i32> {
self.to_i128().map(|x| x as i32)
}

fn to_i64(self) -> Option<i64> {
self.to_i128().map(|x| x as i64)
}

fn to_i128(self) -> Option<i128> {
self.to_i128()
}
Expand Down
14 changes: 14 additions & 0 deletions arrow-cast/src/cast/dictionary.rs
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,20 @@ pub(crate) fn cast_to_dictionary<K: ArrowDictionaryKeyType>(
UInt16 => pack_numeric_to_dictionary::<K, UInt16Type>(array, dict_value_type, cast_options),
UInt32 => pack_numeric_to_dictionary::<K, UInt32Type>(array, dict_value_type, cast_options),
UInt64 => pack_numeric_to_dictionary::<K, UInt64Type>(array, dict_value_type, cast_options),
Decimal32(p, s) => pack_decimal_to_dictionary::<K, Decimal32Type>(
array,
dict_value_type,
p,
s,
cast_options,
),
Decimal64(p, s) => pack_decimal_to_dictionary::<K, Decimal64Type>(
array,
dict_value_type,
p,
s,
cast_options,
),
Decimal128(p, s) => pack_decimal_to_dictionary::<K, Decimal128Type>(
array,
dict_value_type,
Expand Down
Loading
Loading