parquet 0.7.0 → 0.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/ext/parquet-ruby-adapter/src/converter.rs +40 -2
- data/lib/parquet/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 26217bfdf85fd24ebfa20f7647d268e493a34951cb8ae5e8d7009029fd728dde
|
4
|
+
data.tar.gz: e840e0f7432585477dd1df7839938c4f65b6b4b8325f3edbc0d179aa50240a45
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a48340845a3e679969f3ad235087272b4f3cace61d9cd0ee14673b029a730998c36c5730e9e295cabe7df1fc0d1d5ed8ef673236fba0999d9e1e886eb48f9f84
|
7
|
+
data.tar.gz: f4b17962809300fbba73e55479a384efa595754f86e69c7882d7c3e70f41600bfb6a2e2f43a6006b03190e829052a90ee488185d017f22da503dbaf9b80168d2
|
@@ -1395,8 +1395,46 @@ pub fn parquet_to_ruby(value: ParquetValue) -> Result<Value> {
|
|
1395
1395
|
ParquetValue::UInt16(i) => Ok((i as u64).into_value_with(&ruby)),
|
1396
1396
|
ParquetValue::UInt32(i) => Ok((i as u64).into_value_with(&ruby)),
|
1397
1397
|
ParquetValue::UInt64(i) => Ok(i.into_value_with(&ruby)),
|
1398
|
-
ParquetValue::Float16(OrderedFloat(f)) =>
|
1399
|
-
|
1398
|
+
ParquetValue::Float16(OrderedFloat(f)) => {
|
1399
|
+
let cleaned = {
|
1400
|
+
// Fast-path the specials.
|
1401
|
+
if f.is_nan() || f.is_infinite() {
|
1402
|
+
f as f64
|
1403
|
+
} else if f == 0.0 {
|
1404
|
+
// Keep the IEEE-754 sign bit for −0.0.
|
1405
|
+
if f.is_sign_negative() {
|
1406
|
+
-0.0
|
1407
|
+
} else {
|
1408
|
+
0.0
|
1409
|
+
}
|
1410
|
+
} else {
|
1411
|
+
// `to_string` gives the shortest exact, round-trippable decimal.
|
1412
|
+
// Parsing it back to `f64` cannot fail
|
1413
|
+
f.to_string().parse::<f64>()?
|
1414
|
+
}
|
1415
|
+
};
|
1416
|
+
Ok(cleaned.into_value_with(&ruby))
|
1417
|
+
}
|
1418
|
+
ParquetValue::Float32(OrderedFloat(f)) => {
|
1419
|
+
let cleaned = {
|
1420
|
+
// Fast-path the specials.
|
1421
|
+
if f.is_nan() || f.is_infinite() {
|
1422
|
+
f as f64
|
1423
|
+
} else if f == 0.0 {
|
1424
|
+
// Keep the IEEE-754 sign bit for −0.0.
|
1425
|
+
if f.is_sign_negative() {
|
1426
|
+
-0.0
|
1427
|
+
} else {
|
1428
|
+
0.0
|
1429
|
+
}
|
1430
|
+
} else {
|
1431
|
+
// `to_string` gives the shortest exact, round-trippable decimal.
|
1432
|
+
// Parsing it back to `f64` cannot fail
|
1433
|
+
f.to_string().parse::<f64>()?
|
1434
|
+
}
|
1435
|
+
};
|
1436
|
+
Ok(cleaned.into_value_with(&ruby))
|
1437
|
+
}
|
1400
1438
|
ParquetValue::Float64(OrderedFloat(f)) => Ok(f.into_value_with(&ruby)),
|
1401
1439
|
ParquetValue::String(s) => Ok(s.into_value_with(&ruby)),
|
1402
1440
|
ParquetValue::Uuid(u) => Ok(u
|
data/lib/parquet/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: parquet
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nathan Jaremko
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-07-
|
11
|
+
date: 2025-07-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rb_sys
|