duckdb 0.8.1.1 → 0.8.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a81125e254f14fe183bff2a5e471274ed995f22dcb7b3b62470c222bc4e69568
4
- data.tar.gz: 2c84267e72092bde6c2948a3b02d1eeb7ae5ad7a941bdf7b134b4ecc2076415f
3
+ metadata.gz: a9ce44263b8239010b8a203c7cebadf9e1b07323efc89164877e8ded4e37f768
4
+ data.tar.gz: 44dc20be5aa79c3b29f7bd7b57aa5d9e30524919499a88e7b7d5d50318468554
5
5
  SHA512:
6
- metadata.gz: af45ace99bfb16d3d880a47236ee95c6ba8dea03c32f734f1b0491f4f996b862578570501ebc70a00d9fa24c18180883f4961839f7df43b077b7cc2ea1c5bff3
7
- data.tar.gz: d0307462d6e9be514087c6eb31750557896f792b4eaa0aa6d2558162eacbbd3ffc7d7289fcf392e11246e0dd55daa2a3c50f534f917749a92a038547d4453d64
6
+ metadata.gz: 41fd80e244cd09100931b695533314aa29c040f7571f64747cb79533da45c8685adc1fc04bc731cff5d59e5c58f8669db2c9cb1eebb8dcdfc78f92b3d7cb49d6
7
+ data.tar.gz: 75e8d32f1d467be39365f0ffe3f3f40471b1b580929f025736ec6d47db9dad62a99beb490a118066a7145837717dfcc337e5f1aaafba7f068c63279ef16770f9
data/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # ChangeLog
2
2
 
3
+ # 0.8.1.3
4
+ - Fix BigDecimal conversion.
5
+
6
+ # 0.8.1.2
7
+ - Fix BigDecimal conversion when the value is 0.
8
+ Thanks to shreeve.
9
+
3
10
  # 0.8.1.1
4
11
  - DuckDB::Result#chunk_each supports:
5
12
  - UTINYINT
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- duckdb (0.8.1.1)
4
+ duckdb (0.8.1.3)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -9,10 +9,10 @@ GEM
9
9
  benchmark-ips (2.12.0)
10
10
  mini_portile2 (2.8.2)
11
11
  minitest (5.18.1)
12
- nokogiri (1.15.2)
12
+ nokogiri (1.15.3)
13
13
  mini_portile2 (~> 2.8.2)
14
14
  racc (~> 1.4)
15
- nokogiri (1.15.2-x86_64-linux)
15
+ nokogiri (1.15.3-x86_64-linux)
16
16
  racc (~> 1.4)
17
17
  racc (1.7.1)
18
18
  rake (13.0.6)
@@ -37,4 +37,4 @@ DEPENDENCIES
37
37
  stackprof
38
38
 
39
39
  BUNDLED WITH
40
- 2.4.10
40
+ 2.4.17
@@ -23,6 +23,7 @@ module DuckDB
23
23
 
24
24
  def _to_decimal_from_vector(_width, scale, lower, upper)
25
25
  v = _to_hugeint_from_vector(lower, upper).to_s
26
+ v = v.rjust(scale + 1, '0') if v.length < scale
26
27
  v[-scale, 0] = '.'
27
28
  BigDecimal(v)
28
29
  end
data/lib/duckdb/result.rb CHANGED
@@ -102,10 +102,8 @@ module DuckDB
102
102
  end
103
103
 
104
104
  def _to_decimal_internal(row, col)
105
- lower, upper, _width, scale = __to_decimal_internal(row, col)
106
- v = (upper * Converter::HALF_HUGEINT + lower).to_s
107
- v[-scale, 0] = '.'
108
- BigDecimal(v)
105
+ lower, upper, width, scale = __to_decimal_internal(row, col)
106
+ Converter._to_decimal_from_vector(width, scale, lower, upper)
109
107
  end
110
108
  end
111
109
  end
@@ -3,5 +3,5 @@
3
3
  module DuckDB
4
4
  # The version string of ruby-duckdb.
5
5
  # Currently, ruby-duckdb is NOT semantic versioning.
6
- VERSION = '0.8.1.1'
6
+ VERSION = '0.8.1.3'
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: duckdb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.1.1
4
+ version: 0.8.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Masaki Suketa
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-07-14 00:00:00.000000000 Z
11
+ date: 2023-07-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -154,7 +154,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
154
154
  - !ruby/object:Gem::Version
155
155
  version: '0'
156
156
  requirements: []
157
- rubygems_version: 3.4.10
157
+ rubygems_version: 3.4.17
158
158
  signing_key:
159
159
  specification_version: 4
160
160
  summary: This module is Ruby binding for DuckDB database engine.