duckdb 1.5.1.1 → 1.5.2.1
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/CHANGELOG.md +47 -0
- data/README.md +18 -0
- data/duckdb.gemspec +16 -12
- data/ext/duckdb/aggregate_function.c +752 -0
- data/ext/duckdb/aggregate_function.h +18 -0
- data/ext/duckdb/appender.c +99 -31
- data/ext/duckdb/appender.h +1 -1
- data/ext/duckdb/client_context.c +5 -5
- data/ext/duckdb/client_context.h +2 -2
- data/ext/duckdb/column.c +13 -13
- data/ext/duckdb/column.h +1 -1
- data/ext/duckdb/connection.c +76 -31
- data/ext/duckdb/connection.h +2 -2
- data/ext/duckdb/converter.h +5 -9
- data/ext/duckdb/conveter.c +151 -18
- data/ext/duckdb/data_chunk.c +84 -15
- data/ext/duckdb/data_chunk.h +3 -2
- data/ext/duckdb/database.c +12 -56
- data/ext/duckdb/database.h +1 -1
- data/ext/duckdb/duckdb.c +20 -16
- data/ext/duckdb/expression.c +8 -8
- data/ext/duckdb/expression.h +1 -1
- data/ext/duckdb/extconf.rb +3 -4
- data/ext/duckdb/extracted_statements.c +16 -16
- data/ext/duckdb/extracted_statements.h +1 -1
- data/ext/duckdb/function_executor.c +261 -0
- data/ext/duckdb/function_executor.h +46 -0
- data/ext/duckdb/function_vector.c +207 -0
- data/ext/duckdb/function_vector.h +27 -0
- data/ext/duckdb/instance_cache.c +10 -10
- data/ext/duckdb/instance_cache.h +1 -1
- data/ext/duckdb/logical_type.c +94 -133
- data/ext/duckdb/logical_type.h +2 -2
- data/ext/duckdb/memory_helper.c +28 -28
- data/ext/duckdb/pending_result.c +27 -27
- data/ext/duckdb/pending_result.h +2 -2
- data/ext/duckdb/prepared_statement.c +116 -99
- data/ext/duckdb/prepared_statement.h +2 -2
- data/ext/duckdb/result.c +41 -33
- data/ext/duckdb/result.h +2 -3
- data/ext/duckdb/ruby-duckdb.h +12 -3
- data/ext/duckdb/scalar_function.c +56 -452
- data/ext/duckdb/table_description.c +144 -0
- data/ext/duckdb/table_description.h +16 -0
- data/ext/duckdb/table_function.c +81 -44
- data/ext/duckdb/table_function_bind_info.c +1 -1
- data/ext/duckdb/value.c +291 -0
- data/ext/duckdb/value.h +15 -0
- data/ext/duckdb/vector.c +20 -20
- data/ext/duckdb/vector.h +2 -2
- data/lib/duckdb/aggregate_function.rb +246 -0
- data/lib/duckdb/appender.rb +106 -7
- data/lib/duckdb/column_description.rb +32 -0
- data/lib/duckdb/connection.rb +56 -16
- data/lib/duckdb/converter.rb +30 -14
- data/lib/duckdb/data_chunk.rb +46 -31
- data/lib/duckdb/database.rb +44 -15
- data/lib/duckdb/extracted_statements.rb +2 -2
- data/lib/duckdb/function_type_validation.rb +50 -0
- data/lib/duckdb/interval.rb +15 -9
- data/lib/duckdb/logical_type.rb +1 -3
- data/lib/duckdb/prepared_statement.rb +19 -5
- data/lib/duckdb/scalar_function.rb +10 -49
- data/lib/duckdb/table_description.rb +79 -0
- data/lib/duckdb/table_function.rb +0 -1
- data/lib/duckdb/value.rb +267 -0
- data/lib/duckdb/version.rb +1 -1
- data/lib/duckdb.rb +5 -0
- metadata +21 -31
- data/.gitattributes +0 -1
- data/.github/FUNDING.yml +0 -3
- data/.github/copilot-instructions.md +0 -169
- data/.github/workflows/linter.yml +0 -30
- data/.github/workflows/make_documents.yml +0 -34
- data/.github/workflows/test_on_macos.yml +0 -103
- data/.github/workflows/test_on_ubuntu.yml +0 -108
- data/.github/workflows/test_on_windows.yml +0 -71
- data/.gitignore +0 -19
- data/.rubocop.yml +0 -34
- data/CONTRIBUTION.md +0 -45
- data/Dockerfile +0 -22
- data/Gemfile +0 -16
- data/Gemfile.lock +0 -77
- data/benchmark/converter_hugeint_ips.rb +0 -27
- data/benchmark/get_converter_module_ips.rb +0 -26
- data/benchmark/to_intern_ips.rb +0 -72
- data/docker-compose.yml +0 -11
- data/ext/duckdb/value_impl.c +0 -138
- data/ext/duckdb/value_impl.h +0 -15
- data/getduckdb.sh +0 -18
- data/sample/async_query.rb +0 -25
- data/sample/issue922.rb +0 -54
- data/sample/issue922_benchmark.rb +0 -169
- data/sample/issue930.rb +0 -49
- data/sample/issue930_benchmark.rb +0 -70
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4c7c57e0282ec2213b1efb3844445804e5fbbc09e03496f2ba71c1bd24152843
|
|
4
|
+
data.tar.gz: 9057fa45fafeba0dc2110562f98cd49eecf53ec0f0a48a989756742525c82b4a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 78bbd166f587491085267791ffca949f2b310597f802424b7e0525c8c4f35f345c2362b17b33401bee374601d5f52746d10ac21f60ea8344bd3bf08e28d7f4b5
|
|
7
|
+
data.tar.gz: 6fc88b5e289ef3451691f57cb404c390b9deabbafddf81e8aedd300121276a9df62b0492559f2602eb4aeaa57ed2a83cc98ccfbef3a728771c34a565a022f78a
|
data/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,53 @@ All notable changes to this project will be documented in this file.
|
|
|
4
4
|
|
|
5
5
|
# Unreleased
|
|
6
6
|
|
|
7
|
+
# 1.5.2.1 - 2026-04-24
|
|
8
|
+
|
|
9
|
+
- add `DuckDB::AggregateFunction.create`.
|
|
10
|
+
- add `DuckDB::Appender#clear_columns`.
|
|
11
|
+
- add `DuckDB::Appender#add_column`.
|
|
12
|
+
- add `DuckDB::Appender#clear` to discard all unflushed data from the appender without writing it to the table (requires DuckDB >= 1.5.0).
|
|
13
|
+
- add `DuckDB::Value.create_decimal`.
|
|
14
|
+
- fix gemspec to use `git ls-files`, preventing precompiled x86_64 `.so` from being bundled into the gem and breaking non-x86 platforms.
|
|
15
|
+
|
|
16
|
+
# 1.5.2.0 - 2026-04-16
|
|
17
|
+
|
|
18
|
+
- add `DuckDB::DataChunk#reset` to clear a chunk's contents so it can be reused across multiple `Appender#append_data_chunk` calls without reallocation.
|
|
19
|
+
- add `DuckDB::Database.new(path = :memory, config: nil, &block)` to create a database instance. `path` is a positional argument (default `:memory` for in-memory database, or a String path for file database). `config:` accepts an optional `DuckDB::Config` object. When a block is given, the database is yielded and automatically closed afterwards.
|
|
20
|
+
- add `TIME_NS` column support to `DuckDB::Result`. `TIME_NS` values are returned as `Time` objects with nanoseconds truncated to microseconds.
|
|
21
|
+
- add `INTERVAL` as a supported `return_type` for `DuckDB::ScalarFunction`. The scalar function block can now return a `DuckDB::Interval` object and it will be written back to the result vector correctly.
|
|
22
|
+
- add `UUID` as a supported `return_type` for `DuckDB::ScalarFunction`. The scalar function block can now return a UUID string and it will be written back to the result vector correctly.
|
|
23
|
+
- add `DuckDB::Connection#extract` to extract multiple SQL statements as prepared statements without executing them.
|
|
24
|
+
- add `DuckDB::Connection#register_logical_type` to register a custom logical type with a connection.
|
|
25
|
+
- add `DuckDB::PreparedStatement#bind_value`.
|
|
26
|
+
- add `DuckDB::Value.create_bool`.
|
|
27
|
+
- add `DuckDB::Value.create_int8`.
|
|
28
|
+
- add `DuckDB::Value.create_int16`.
|
|
29
|
+
- add `DuckDB::Value.create_int32`.
|
|
30
|
+
- add `DuckDB::Value.create_int64`.
|
|
31
|
+
- add `DuckDB::Value.create_uint8`.
|
|
32
|
+
- add `DuckDB::Value.create_uint16`.
|
|
33
|
+
- add `DuckDB::Value.create_uint32`.
|
|
34
|
+
- add `DuckDB::Value.create_uint64`.
|
|
35
|
+
- add `DuckDB::Value.create_null`.
|
|
36
|
+
- add `DuckDB::Value.create_float`.
|
|
37
|
+
- add `DuckDB::Value.create_double`.
|
|
38
|
+
- add `DuckDB::Value.create_varchar`.
|
|
39
|
+
- add `DuckDB::Value.create_blob`.
|
|
40
|
+
- add `DuckDB::Value.create_hugeint`.
|
|
41
|
+
- add `DuckDB::Value.create_uhugeint`.
|
|
42
|
+
- add `DuckDB::Appender#append_value`.
|
|
43
|
+
- add `DuckDB::Appender#append_data_chunk` to append a `DuckDB::DataChunk` in one call.
|
|
44
|
+
- add `DuckDB::DataChunk.new(types)` to create an owned data chunk from Ruby logical types.
|
|
45
|
+
- add `DuckDB::AggregateFunction`.
|
|
46
|
+
- add `DuckDB::TableDescription` to retrieve metadata about a table (with DuckDB >= 1.5.0).
|
|
47
|
+
- add `DuckDB::ColumnDescription` to describe a column's name, logical type, and whether it has a default value (with DuckDB >= 1.5.0).
|
|
48
|
+
|
|
49
|
+
## Breaking Changes
|
|
50
|
+
- rename `DuckDB::ValueImpl` to `DuckDB::Value`
|
|
51
|
+
- remove `DuckDB::ExtractedStatementsImpl`. use `DuckDB::ExtractedStatements`
|
|
52
|
+
- `DuckDB::Database.open` to delegate to `DuckDB::Database.new`. The signature changes from `open(dbpath = nil, config = nil)` to `open(path = :memory, config: nil)`. `DuckDB::Database.open` now accepts `:memory` symbol and `config:` keyword argument.
|
|
53
|
+
|
|
7
54
|
# 1.5.1.1 - 2026-04-04
|
|
8
55
|
|
|
9
56
|
- fix `DuckDB::ScalarFunction` to allow `HUGEINT` and `UHUGEINT` as `return_type` and parameter type (the C extension's vector write path was missing those cases).
|
data/README.md
CHANGED
|
@@ -265,3 +265,21 @@ res.first.first # => 4
|
|
|
265
265
|
#### Global configuration
|
|
266
266
|
|
|
267
267
|
Set `DuckDB.default_timezone` to control how TIMESTAMP and TIME values without time zone are converted to Ruby `Time` objects. The default is `:local`, but you can use `:utc` for UTC conversion.
|
|
268
|
+
|
|
269
|
+
## Versioning and DuckDB support
|
|
270
|
+
|
|
271
|
+
The first three digits of the gem version track the DuckDB release that the
|
|
272
|
+
gem is aligned with. For example, ruby-duckdb `1.5.1.0` runs with DuckDB
|
|
273
|
+
`1.5.1`.
|
|
274
|
+
|
|
275
|
+
All releases in the same `1.5.1.x` series target DuckDB `1.5.1`. The fourth
|
|
276
|
+
digit is reserved for ruby-duckdb-only releases, such as gem bug fixes or new
|
|
277
|
+
gem features. For example, `1.5.1.1` still targets DuckDB `1.5.1`.
|
|
278
|
+
|
|
279
|
+
We also aim to support the latest release from the previous minor series, so
|
|
280
|
+
the `1.5.1.x` series should also support DuckDB `1.4.x`.
|
|
281
|
+
|
|
282
|
+
In addition, we try to support DuckDB LTS releases whenever practical.
|
|
283
|
+
|
|
284
|
+
This gem aims to support most DuckDB minor releases, but we may occasionally
|
|
285
|
+
skip a minor series.
|
data/duckdb.gemspec
CHANGED
|
@@ -1,33 +1,37 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
5
|
-
require 'duckdb/version'
|
|
3
|
+
require_relative 'lib/duckdb/version'
|
|
6
4
|
|
|
7
5
|
Gem::Specification.new do |spec|
|
|
8
6
|
spec.name = 'duckdb'
|
|
9
7
|
spec.version = DuckDB::VERSION
|
|
10
8
|
spec.authors = ['Masaki Suketa']
|
|
11
9
|
spec.email = ['masaki.suketa@nifty.ne.jp']
|
|
12
|
-
|
|
13
|
-
spec.summary = 'This module is Ruby binding for DuckDB database engine.'
|
|
14
|
-
spec.description = 'This module is Ruby binding for DuckDB database engine. ' \
|
|
15
|
-
'You must have the DuckDB engine installed to build/use this module.'
|
|
16
10
|
spec.homepage = 'https://github.com/suketa/ruby-duckdb'
|
|
17
11
|
spec.license = 'MIT'
|
|
18
12
|
|
|
13
|
+
spec.summary = 'Ruby bindings for the DuckDB database engine.'
|
|
14
|
+
spec.description = <<~TEXT
|
|
15
|
+
This gem provides bindings for DuckDB, which is an in-process SQL database optimized for analytical queries on structured data.
|
|
16
|
+
It's lightweight, embeddable, and works directly with files like Parquet and CSV, making it popular for data analysis tasks.
|
|
17
|
+
TEXT
|
|
18
|
+
|
|
19
19
|
spec.metadata['rubygems_mfa_required'] = 'true'
|
|
20
20
|
spec.metadata['homepage_uri'] = spec.homepage
|
|
21
|
-
spec.metadata['source_code_uri'] =
|
|
22
|
-
spec.metadata['changelog_uri'] =
|
|
21
|
+
spec.metadata['source_code_uri'] = spec.homepage
|
|
22
|
+
spec.metadata['changelog_uri'] = "#{spec.homepage}/blob/main/CHANGELOG.md"
|
|
23
23
|
|
|
24
24
|
# Specify which files should be added to the gem when it is released.
|
|
25
|
-
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
|
26
25
|
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
|
27
|
-
`git ls-files -z`.split("\x0").reject
|
|
26
|
+
`git ls-files -z`.split("\x0").reject do |f|
|
|
27
|
+
f.match(%r{^(test|spec|features|sample|benchmark)/|^\.(?!rdoc_options)|
|
|
28
|
+
^(HACKING|CONTRIBUTION)\.md$|
|
|
29
|
+
^(Dockerfile|docker-compose\.yml|getduckdb\.sh|Gemfile(\.lock)?)$}x)
|
|
30
|
+
end
|
|
28
31
|
end
|
|
32
|
+
|
|
29
33
|
spec.require_paths = ['lib']
|
|
30
|
-
spec.extensions
|
|
34
|
+
spec.extensions = ['ext/duckdb/extconf.rb']
|
|
31
35
|
spec.required_ruby_version = '>= 3.2.0'
|
|
32
36
|
spec.add_dependency 'bigdecimal', '>= 3.1.4'
|
|
33
37
|
end
|