duckdb 0.9.2 → 0.9.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/test_on_macos.yml +4 -4
- data/.github/workflows/test_on_ubuntu.yml +4 -5
- data/.github/workflows/test_on_windows.yml +4 -4
- data/CHANGELOG.md +26 -16
- data/Gemfile.lock +4 -6
- data/duckdb.gemspec +1 -1
- data/ext/duckdb/result.c +15 -0
- data/lib/duckdb/converter.rb +12 -0
- data/lib/duckdb/interval.rb +4 -0
- data/lib/duckdb/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ae1127b035cba551fdee1c009f9e0ee76161936aadaf192d1e78bdf6c5482c0a
|
4
|
+
data.tar.gz: 9c7889dbc1dc31af86d99011b3af37fe427ac23a3ba40f6aa23f253c7453874d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 67cbfeabe7fcbc6e2cab91ea0eb3670546ad33ef06e9f3f9cd768885b3b17849910e55bc0d6d71d609ccca90d8896a08df2a8b3a2b4477b2591a5ad60135b388
|
7
|
+
data.tar.gz: 00a229aad9144ebb1d36664729211795f728fc00888323b0bdbbd1e516a274d62e4727fb469d1e913e5c8e7a4bc15226e938d85d25f9c3684797d94a73272581
|
@@ -1,9 +1,9 @@
|
|
1
1
|
name: MacOS
|
2
2
|
|
3
3
|
on:
|
4
|
-
|
5
|
-
|
6
|
-
|
4
|
+
push:
|
5
|
+
branches:
|
6
|
+
- main
|
7
7
|
pull_request:
|
8
8
|
types:
|
9
9
|
- opened
|
@@ -15,7 +15,7 @@ jobs:
|
|
15
15
|
runs-on: macos-latest
|
16
16
|
strategy:
|
17
17
|
matrix:
|
18
|
-
ruby: ['
|
18
|
+
ruby: ['3.0.6', '3.1.4', '3.2.2', '3.3.0', 'head']
|
19
19
|
duckdb: ['0.9.2', '0.8.1']
|
20
20
|
|
21
21
|
steps:
|
@@ -1,9 +1,9 @@
|
|
1
1
|
name: Ubuntu
|
2
2
|
|
3
3
|
on:
|
4
|
-
|
5
|
-
|
6
|
-
|
4
|
+
push:
|
5
|
+
branches:
|
6
|
+
- main
|
7
7
|
pull_request:
|
8
8
|
types:
|
9
9
|
- opened
|
@@ -15,7 +15,7 @@ jobs:
|
|
15
15
|
runs-on: ubuntu-latest
|
16
16
|
strategy:
|
17
17
|
matrix:
|
18
|
-
ruby: ['
|
18
|
+
ruby: ['3.0.6', '3.1.4', '3.2.2', '3.3.0', 'head']
|
19
19
|
duckdb: ['0.9.2', '0.8.1']
|
20
20
|
|
21
21
|
steps:
|
@@ -49,7 +49,6 @@ jobs:
|
|
49
49
|
env:
|
50
50
|
DUCKDB_VERSION: ${{ matrix.duckdb }}
|
51
51
|
run: |
|
52
|
-
gem install bundler
|
53
52
|
bundle install --jobs 4 --retry 3
|
54
53
|
bundle exec rake build -- --with-duckdb-include=${GITHUB_WORKSPACE}/duckdb-v${DUCKDB_VERSION}/src/include --with-duckdb-lib=${GITHUB_WORKSPACE}/duckdb-v${DUCKDB_VERSION}/build/release/src/
|
55
54
|
|
@@ -1,9 +1,9 @@
|
|
1
1
|
name: Windows
|
2
2
|
|
3
3
|
on:
|
4
|
-
|
5
|
-
|
6
|
-
|
4
|
+
push:
|
5
|
+
branches:
|
6
|
+
- main
|
7
7
|
pull_request:
|
8
8
|
types:
|
9
9
|
- opened
|
@@ -15,7 +15,7 @@ jobs:
|
|
15
15
|
runs-on: windows-latest
|
16
16
|
strategy:
|
17
17
|
matrix:
|
18
|
-
ruby: ['
|
18
|
+
ruby: ['3.0.6', '3.1.4', '3.2.2', 'ucrt', 'mingw', 'mswin', 'head']
|
19
19
|
duckdb: ['0.9.2', '0.8.1']
|
20
20
|
|
21
21
|
steps:
|
data/CHANGELOG.md
CHANGED
@@ -1,23 +1,33 @@
|
|
1
1
|
# ChangeLog
|
2
2
|
|
3
|
+
# 0.9.2.2
|
4
|
+
- bump Ruby to 3.3.0 on CI.
|
5
|
+
|
6
|
+
## Breaking changes
|
7
|
+
- drop Ruby 2.7.
|
8
|
+
|
9
|
+
# 0.9.2.1
|
10
|
+
- support Time column in `DuckDB#Result#chunk_each`.
|
11
|
+
- add `DuckDB::Interval#eql?`.
|
12
|
+
|
3
13
|
# 0.9.2
|
4
|
-
- add DuckDB::Connection#async_query_stream
|
5
|
-
- DuckDB::PendingResult accepts second argument. If the second argument is
|
6
|
-
true, PendingResult#execute_pending returns streaming DuckDB::Result object.
|
7
|
-
- add DuckDB::PreparedStatement#pending_prepared_stream
|
8
|
-
- add DuckDB::Result#streaming
|
14
|
+
- add `DuckDB::Connection#async_query_stream`.
|
15
|
+
- `DuckDB::PendingResult` accepts second argument. If the second argument is
|
16
|
+
true, `PendingResult#execute_pending` returns streaming `DuckDB::Result` object.
|
17
|
+
- add `DuckDB::PreparedStatement#pending_prepared_stream`
|
18
|
+
- add `DuckDB::Result#streaming?`.
|
9
19
|
|
10
20
|
# 0.9.1.2
|
11
|
-
- add DuckDB::Connection#interrupt
|
12
|
-
- add DuckDB::Connection#async_query
|
21
|
+
- add `DuckDB::Connection#interrupt`, `DuckDB::Connection#query_progress`.
|
22
|
+
- add `DuckDB::Connection#async_query`, alias method `async_execute`.
|
13
23
|
|
14
24
|
# 0.9.1.1
|
15
25
|
- change default branch to main from master.
|
16
|
-
- add DuckDB::PendingResult class.
|
17
|
-
- add DuckDB::PendingResult#state
|
18
|
-
- add DuckDB::PendingResult#execute_task
|
19
|
-
- add DuckDB::PendingResult#execute_pending
|
20
|
-
- add DuckDB::PreparedStatement#pending_prepared
|
26
|
+
- add `DuckDB::PendingResult` class.
|
27
|
+
- add `DuckDB::PendingResult#state`.
|
28
|
+
- add `DuckDB::PendingResult#execute_task`.
|
29
|
+
- add `DuckDB::PendingResult#execute_pending`.
|
30
|
+
- add `DuckDB::PreparedStatement#pending_prepared`.
|
21
31
|
|
22
32
|
## Breaking Changes
|
23
33
|
- drop duckdb v0.7.x.
|
@@ -28,16 +38,16 @@
|
|
28
38
|
|
29
39
|
# 0.9.0.1
|
30
40
|
- add `DuckDB::PreparedStatement#bind_parameter_index`.
|
31
|
-
- DuckDB::Connection#query accepts SQL with named bind parameters.
|
41
|
+
- `DuckDB::Connection#query` accepts SQL with named bind parameters.
|
32
42
|
|
33
43
|
# 0.9.0
|
34
44
|
- bump duckdb to 0.9.0.
|
35
45
|
|
36
46
|
## Breaking Changes
|
37
|
-
- deprecation warning when DuckDB::Result.each calling with `DuckDB::Result.use_chunk_each` is false.
|
47
|
+
- deprecation warning when `DuckDB::Result.each` calling with `DuckDB::Result.use_chunk_each` is false.
|
38
48
|
The `each` behavior will be same as `DuckDB::Result.chunk_each` in the future.
|
39
49
|
set `DuckDB::Result.use_chunk_each = true` to suppress the warning.
|
40
|
-
- DuckDB::Result#
|
50
|
+
- `DuckDB::Result#chunk_each` returns `DuckDB::Interval` class when the column type is INTERVAL.
|
41
51
|
|
42
52
|
# 0.8.1.3
|
43
53
|
- Fix BigDecimal conversion.
|
@@ -64,7 +74,7 @@
|
|
64
74
|
But `DuckDB::Result#each` behavior will be changed like as `DuckDB::Result#chunk_each` in near future release.
|
65
75
|
And there are some breaking changes.
|
66
76
|
Write `DuckdDB::Result.use_chunk_each = true` if you want to try new behavior.
|
67
|
-
```
|
77
|
+
```ruby
|
68
78
|
DuckDB::Result.use_chunk_each = true
|
69
79
|
|
70
80
|
result = con.query('SELECT ....')
|
data/Gemfile.lock
CHANGED
@@ -1,24 +1,22 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
duckdb (0.9.2)
|
4
|
+
duckdb (0.9.2.2)
|
5
5
|
|
6
6
|
GEM
|
7
7
|
remote: https://rubygems.org/
|
8
8
|
specs:
|
9
|
-
benchmark-ips (2.
|
9
|
+
benchmark-ips (2.13.0)
|
10
10
|
mini_portile2 (2.8.5)
|
11
11
|
minitest (5.20.0)
|
12
12
|
nokogiri (1.15.5)
|
13
13
|
mini_portile2 (~> 2.8.2)
|
14
14
|
racc (~> 1.4)
|
15
|
-
nokogiri (1.15.5-x86_64-linux)
|
16
|
-
racc (~> 1.4)
|
17
15
|
racc (1.7.3)
|
18
16
|
rake (13.1.0)
|
19
17
|
rake-compiler (1.2.5)
|
20
18
|
rake
|
21
|
-
ruby_memcheck (2.
|
19
|
+
ruby_memcheck (2.3.0)
|
22
20
|
nokogiri
|
23
21
|
stackprof (0.2.25)
|
24
22
|
|
@@ -37,4 +35,4 @@ DEPENDENCIES
|
|
37
35
|
stackprof
|
38
36
|
|
39
37
|
BUNDLED WITH
|
40
|
-
2.
|
38
|
+
2.5.3
|
data/duckdb.gemspec
CHANGED
@@ -26,7 +26,7 @@ Gem::Specification.new do |spec|
|
|
26
26
|
end
|
27
27
|
spec.require_paths = ['lib']
|
28
28
|
spec.extensions = ['ext/duckdb/extconf.rb']
|
29
|
-
spec.required_ruby_version = '>=
|
29
|
+
spec.required_ruby_version = '>= 3.0.0'
|
30
30
|
|
31
31
|
spec.add_development_dependency 'bundler', '~> 2.3'
|
32
32
|
spec.add_development_dependency 'minitest', '~> 5.0'
|
data/ext/duckdb/result.c
CHANGED
@@ -44,6 +44,7 @@ static VALUE duckdb_result__enum_dictionary_value(VALUE oDuckDBResult, VALUE col
|
|
44
44
|
|
45
45
|
static VALUE vector_date(void *vector_data, idx_t row_idx);
|
46
46
|
static VALUE vector_timestamp(void* vector_data, idx_t row_idx);
|
47
|
+
static VALUE vector_time(void* vector_data, idx_t row_idx);
|
47
48
|
static VALUE vector_interval(void* vector_data, idx_t row_idx);
|
48
49
|
static VALUE vector_blob(void* vector_data, idx_t row_idx);
|
49
50
|
static VALUE vector_varchar(void* vector_data, idx_t row_idx);
|
@@ -501,6 +502,17 @@ static VALUE vector_timestamp(void* vector_data, idx_t row_idx) {
|
|
501
502
|
);
|
502
503
|
}
|
503
504
|
|
505
|
+
static VALUE vector_time(void* vector_data, idx_t row_idx) {
|
506
|
+
duckdb_time_struct data = duckdb_from_time(((duckdb_time *)vector_data)[row_idx]);
|
507
|
+
return rb_funcall(mDuckDBConverter, rb_intern("_to_time_from_duckdb_time"), 4,
|
508
|
+
INT2FIX(data.hour),
|
509
|
+
INT2FIX(data.min),
|
510
|
+
INT2FIX(data.sec),
|
511
|
+
INT2NUM(data.micros)
|
512
|
+
);
|
513
|
+
}
|
514
|
+
|
515
|
+
|
504
516
|
static VALUE vector_interval(void* vector_data, idx_t row_idx) {
|
505
517
|
duckdb_interval data = ((duckdb_interval *)vector_data)[row_idx];
|
506
518
|
return rb_funcall(mDuckDBConverter, rb_intern("_to_interval_from_vector"), 3,
|
@@ -721,6 +733,9 @@ static VALUE vector_value(duckdb_vector vector, idx_t row_idx) {
|
|
721
733
|
case DUCKDB_TYPE_TIMESTAMP:
|
722
734
|
obj = vector_timestamp(vector_data, row_idx);
|
723
735
|
break;
|
736
|
+
case DUCKDB_TYPE_TIME:
|
737
|
+
obj = vector_time(vector_data, row_idx);
|
738
|
+
break;
|
724
739
|
case DUCKDB_TYPE_INTERVAL:
|
725
740
|
obj = vector_interval(vector_data, row_idx);
|
726
741
|
break;
|
data/lib/duckdb/converter.rb
CHANGED
@@ -19,6 +19,18 @@ module DuckDB
|
|
19
19
|
Time.local(year, month, day, hour, minute, second, microsecond)
|
20
20
|
end
|
21
21
|
|
22
|
+
def _to_time_from_duckdb_time(hour, minute, second, microsecond)
|
23
|
+
Time.parse(
|
24
|
+
format(
|
25
|
+
'%<hour>02d:%<minute>02d:%<second>02d.%<microsecond>06d',
|
26
|
+
hour: hour,
|
27
|
+
minute: minute,
|
28
|
+
second: second,
|
29
|
+
microsecond: microsecond
|
30
|
+
)
|
31
|
+
)
|
32
|
+
end
|
33
|
+
|
22
34
|
def _to_hugeint_from_vector(lower, upper)
|
23
35
|
(upper << HALF_HUGEINT_BIT) + lower
|
24
36
|
end
|
data/lib/duckdb/interval.rb
CHANGED
data/lib/duckdb/version.rb
CHANGED
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.9.2
|
4
|
+
version: 0.9.2.2
|
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-
|
11
|
+
date: 2023-12-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -157,14 +157,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
157
157
|
requirements:
|
158
158
|
- - ">="
|
159
159
|
- !ruby/object:Gem::Version
|
160
|
-
version:
|
160
|
+
version: 3.0.0
|
161
161
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
162
162
|
requirements:
|
163
163
|
- - ">="
|
164
164
|
- !ruby/object:Gem::Version
|
165
165
|
version: '0'
|
166
166
|
requirements: []
|
167
|
-
rubygems_version: 3.
|
167
|
+
rubygems_version: 3.5.3
|
168
168
|
signing_key:
|
169
169
|
specification_version: 4
|
170
170
|
summary: This module is Ruby binding for DuckDB database engine.
|