duckdb 0.9.2 → 0.9.2.1
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 +3 -3
- data/CHANGELOG.md +20 -16
- data/Gemfile.lock +3 -3
- 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 +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b83a52918000c5a6b188eede2053e8f6d3118baad3e451b6a0db48aa0ab8b977
|
4
|
+
data.tar.gz: 12dec4bf0fbf2819067e58f57047a8fd2a0b5f0a6e329fa89d8dc0edc59ed338
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '014489d9944bf9cb36c883450f654be009fccee51a3af1215e2f64e525d13ca8faed8ffed08df60368cd5c7c93e29b773626f9e6b4cccbd00593992d0465af28'
|
7
|
+
data.tar.gz: '08a0fc5a78f29fd006c3e308ab0346df3f18944d337747af8d753a213232bd9c68e1ce5985b040dd00330d8ac6233a233633e466b0d26b4f045dfd9f9835155a'
|
@@ -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: ['2.7.8', '3.0.6', '3.1.4', '3.2.2', '3.3.0-
|
18
|
+
ruby: ['2.7.8', '3.0.6', '3.1.4', '3.2.2', '3.3.0-rc1', '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: ['2.7.8', '3.0.6', '3.1.4', '3.2.2', '3.3.0-
|
18
|
+
ruby: ['2.7.8', '3.0.6', '3.1.4', '3.2.2', '3.3.0-rc1', '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
|
|
data/CHANGELOG.md
CHANGED
@@ -1,23 +1,27 @@
|
|
1
1
|
# ChangeLog
|
2
2
|
|
3
|
+
# 0.9.2.1
|
4
|
+
- support Time column in `DuckDB#Result#chunk_each`.
|
5
|
+
- add `DuckDB::Interval#eql?`.
|
6
|
+
|
3
7
|
# 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
|
8
|
+
- add `DuckDB::Connection#async_query_stream`.
|
9
|
+
- `DuckDB::PendingResult` accepts second argument. If the second argument is
|
10
|
+
true, `PendingResult#execute_pending` returns streaming `DuckDB::Result` object.
|
11
|
+
- add `DuckDB::PreparedStatement#pending_prepared_stream`
|
12
|
+
- add `DuckDB::Result#streaming?`.
|
9
13
|
|
10
14
|
# 0.9.1.2
|
11
|
-
- add DuckDB::Connection#interrupt
|
12
|
-
- add DuckDB::Connection#async_query
|
15
|
+
- add `DuckDB::Connection#interrupt`, `DuckDB::Connection#query_progress`.
|
16
|
+
- add `DuckDB::Connection#async_query`, alias method `async_execute`.
|
13
17
|
|
14
18
|
# 0.9.1.1
|
15
19
|
- 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
|
20
|
+
- add `DuckDB::PendingResult` class.
|
21
|
+
- add `DuckDB::PendingResult#state`.
|
22
|
+
- add `DuckDB::PendingResult#execute_task`.
|
23
|
+
- add `DuckDB::PendingResult#execute_pending`.
|
24
|
+
- add `DuckDB::PreparedStatement#pending_prepared`.
|
21
25
|
|
22
26
|
## Breaking Changes
|
23
27
|
- drop duckdb v0.7.x.
|
@@ -28,16 +32,16 @@
|
|
28
32
|
|
29
33
|
# 0.9.0.1
|
30
34
|
- add `DuckDB::PreparedStatement#bind_parameter_index`.
|
31
|
-
- DuckDB::Connection#query accepts SQL with named bind parameters.
|
35
|
+
- `DuckDB::Connection#query` accepts SQL with named bind parameters.
|
32
36
|
|
33
37
|
# 0.9.0
|
34
38
|
- bump duckdb to 0.9.0.
|
35
39
|
|
36
40
|
## Breaking Changes
|
37
|
-
- deprecation warning when DuckDB::Result.each calling with `DuckDB::Result.use_chunk_each` is false.
|
41
|
+
- deprecation warning when `DuckDB::Result.each` calling with `DuckDB::Result.use_chunk_each` is false.
|
38
42
|
The `each` behavior will be same as `DuckDB::Result.chunk_each` in the future.
|
39
43
|
set `DuckDB::Result.use_chunk_each = true` to suppress the warning.
|
40
|
-
- DuckDB::Result#
|
44
|
+
- `DuckDB::Result#chunk_each` returns `DuckDB::Interval` class when the column type is INTERVAL.
|
41
45
|
|
42
46
|
# 0.8.1.3
|
43
47
|
- Fix BigDecimal conversion.
|
@@ -64,7 +68,7 @@
|
|
64
68
|
But `DuckDB::Result#each` behavior will be changed like as `DuckDB::Result#chunk_each` in near future release.
|
65
69
|
And there are some breaking changes.
|
66
70
|
Write `DuckdDB::Result.use_chunk_each = true` if you want to try new behavior.
|
67
|
-
```
|
71
|
+
```ruby
|
68
72
|
DuckDB::Result.use_chunk_each = true
|
69
73
|
|
70
74
|
result = con.query('SELECT ....')
|
data/Gemfile.lock
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
duckdb (0.9.2)
|
4
|
+
duckdb (0.9.2.1)
|
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)
|
@@ -18,7 +18,7 @@ GEM
|
|
18
18
|
rake (13.1.0)
|
19
19
|
rake-compiler (1.2.5)
|
20
20
|
rake
|
21
|
-
ruby_memcheck (2.
|
21
|
+
ruby_memcheck (2.3.0)
|
22
22
|
nokogiri
|
23
23
|
stackprof (0.2.25)
|
24
24
|
|
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.1
|
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-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|