duckdb 1.5.1.1 → 1.5.2.0

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.
Files changed (73) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +38 -0
  3. data/README.md +18 -0
  4. data/ext/duckdb/aggregate_function.c +791 -0
  5. data/ext/duckdb/aggregate_function.h +18 -0
  6. data/ext/duckdb/appender.c +27 -0
  7. data/ext/duckdb/connection.c +46 -0
  8. data/ext/duckdb/converter.h +4 -2
  9. data/ext/duckdb/conveter.c +145 -12
  10. data/ext/duckdb/data_chunk.c +69 -0
  11. data/ext/duckdb/data_chunk.h +1 -0
  12. data/ext/duckdb/database.c +5 -49
  13. data/ext/duckdb/duckdb.c +5 -1
  14. data/ext/duckdb/extconf.rb +0 -2
  15. data/ext/duckdb/extracted_statements.c +4 -4
  16. data/ext/duckdb/function_executor.c +261 -0
  17. data/ext/duckdb/function_executor.h +46 -0
  18. data/ext/duckdb/function_vector.c +207 -0
  19. data/ext/duckdb/function_vector.h +27 -0
  20. data/ext/duckdb/prepared_statement.c +17 -0
  21. data/ext/duckdb/result.c +8 -0
  22. data/ext/duckdb/ruby-duckdb.h +8 -3
  23. data/ext/duckdb/scalar_function.c +53 -449
  24. data/ext/duckdb/table_description.c +144 -0
  25. data/ext/duckdb/table_description.h +16 -0
  26. data/ext/duckdb/table_function.c +78 -41
  27. data/ext/duckdb/value.c +279 -0
  28. data/ext/duckdb/value.h +15 -0
  29. data/lib/duckdb/aggregate_function.rb +47 -0
  30. data/lib/duckdb/appender.rb +32 -7
  31. data/lib/duckdb/column_description.rb +32 -0
  32. data/lib/duckdb/connection.rb +55 -0
  33. data/lib/duckdb/converter.rb +25 -14
  34. data/lib/duckdb/data_chunk.rb +46 -31
  35. data/lib/duckdb/database.rb +44 -15
  36. data/lib/duckdb/duckdb_native.so +0 -0
  37. data/lib/duckdb/extracted_statements.rb +2 -2
  38. data/lib/duckdb/function_type_validation.rb +50 -0
  39. data/lib/duckdb/interval.rb +15 -9
  40. data/lib/duckdb/prepared_statement.rb +18 -4
  41. data/lib/duckdb/scalar_function.rb +10 -49
  42. data/lib/duckdb/table_description.rb +79 -0
  43. data/lib/duckdb/value.rb +248 -0
  44. data/lib/duckdb/version.rb +1 -1
  45. data/lib/duckdb.rb +5 -0
  46. metadata +22 -32
  47. data/.gitattributes +0 -1
  48. data/.github/FUNDING.yml +0 -3
  49. data/.github/copilot-instructions.md +0 -169
  50. data/.github/workflows/linter.yml +0 -30
  51. data/.github/workflows/make_documents.yml +0 -34
  52. data/.github/workflows/test_on_macos.yml +0 -103
  53. data/.github/workflows/test_on_ubuntu.yml +0 -108
  54. data/.github/workflows/test_on_windows.yml +0 -71
  55. data/.gitignore +0 -19
  56. data/.rubocop.yml +0 -34
  57. data/CONTRIBUTION.md +0 -45
  58. data/Dockerfile +0 -22
  59. data/Gemfile +0 -16
  60. data/Gemfile.lock +0 -77
  61. data/benchmark/converter_hugeint_ips.rb +0 -27
  62. data/benchmark/get_converter_module_ips.rb +0 -26
  63. data/benchmark/to_intern_ips.rb +0 -72
  64. data/docker-compose.yml +0 -11
  65. data/duckdb.gemspec +0 -33
  66. data/ext/duckdb/value_impl.c +0 -138
  67. data/ext/duckdb/value_impl.h +0 -15
  68. data/getduckdb.sh +0 -18
  69. data/sample/async_query.rb +0 -25
  70. data/sample/issue922.rb +0 -54
  71. data/sample/issue922_benchmark.rb +0 -169
  72. data/sample/issue930.rb +0 -49
  73. data/sample/issue930_benchmark.rb +0 -70
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '0982b8680fcd79b493773dbbf39fd3f366fe11ccc952a8bfb4be0a140657e8fe'
4
- data.tar.gz: 34cc46de733b8bc215197e5ceab3eb3022b0067ac34376b828ded5106d4b1261
3
+ metadata.gz: 295ef9eeb24957c23fe7b581094e8961b3c6ce818040246e6b027fd97d462984
4
+ data.tar.gz: 01e6c633d11f6c25ed15a3326250a4c3c107c8257e0a29b6149ea66bde2c4d46
5
5
  SHA512:
6
- metadata.gz: 2b3043a60bbb99bd449f709befb3b84d1036d1e0643c9ed3a93eb50e88df48962095caa537f23881bfc9434a035b240230c8d81004b1d863742916baa6540902
7
- data.tar.gz: 34ff46b0100769147684a4092005838ba418ab1907fc5b0690bd37f883007b0004e4838a5fdfd04ca276d157d91d39523aba74eced99133f46a8039d52b3c036
6
+ metadata.gz: e3472308ea3a5fd362ebe0d2f048451e88b40d35bd14f987f6adc31c050355e340a47897b73ff1c272f409a161950b1ce7dd26c29e63598acfba8695eb4a7249
7
+ data.tar.gz: b31c79510aab7118f0ef0b60d3704135a6e3920eca7bef4835e866b919ea45c796bad353a06c0c0274fab3baac215be763a63bb1911958350abc0acb9c545939
data/CHANGELOG.md CHANGED
@@ -4,6 +4,44 @@ All notable changes to this project will be documented in this file.
4
4
 
5
5
  # Unreleased
6
6
 
7
+ # 1.5.2.0 - 2026-04-16
8
+
9
+ - add `DuckDB::DataChunk#reset` to clear a chunk's contents so it can be reused across multiple `Appender#append_data_chunk` calls without reallocation.
10
+ - 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.
11
+ - add `TIME_NS` column support to `DuckDB::Result`. `TIME_NS` values are returned as `Time` objects with nanoseconds truncated to microseconds.
12
+ - 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.
13
+ - 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.
14
+ - add `DuckDB::Connection#extract` to extract multiple SQL statements as prepared statements without executing them.
15
+ - add `DuckDB::Connection#register_logical_type` to register a custom logical type with a connection.
16
+ - add `DuckDB::PreparedStatement#bind_value`.
17
+ - add `DuckDB::Value.create_bool`.
18
+ - add `DuckDB::Value.create_int8`.
19
+ - add `DuckDB::Value.create_int16`.
20
+ - add `DuckDB::Value.create_int32`.
21
+ - add `DuckDB::Value.create_int64`.
22
+ - add `DuckDB::Value.create_uint8`.
23
+ - add `DuckDB::Value.create_uint16`.
24
+ - add `DuckDB::Value.create_uint32`.
25
+ - add `DuckDB::Value.create_uint64`.
26
+ - add `DuckDB::Value.create_null`.
27
+ - add `DuckDB::Value.create_float`.
28
+ - add `DuckDB::Value.create_double`.
29
+ - add `DuckDB::Value.create_varchar`.
30
+ - add `DuckDB::Value.create_blob`.
31
+ - add `DuckDB::Value.create_hugeint`.
32
+ - add `DuckDB::Value.create_uhugeint`.
33
+ - add `DuckDB::Appender#append_value`.
34
+ - add `DuckDB::Appender#append_data_chunk` to append a `DuckDB::DataChunk` in one call.
35
+ - add `DuckDB::DataChunk.new(types)` to create an owned data chunk from Ruby logical types.
36
+ - add `DuckDB::AggregateFunction`.
37
+ - add `DuckDB::TableDescription` to retrieve metadata about a table (with DuckDB >= 1.5.0).
38
+ - add `DuckDB::ColumnDescription` to describe a column's name, logical type, and whether it has a default value (with DuckDB >= 1.5.0).
39
+
40
+ ## Breaking Changes
41
+ - rename `DuckDB::ValueImpl` to `DuckDB::Value`
42
+ - remove `DuckDB::ExtractedStatementsImpl`. use `DuckDB::ExtractedStatements`
43
+ - `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.
44
+
7
45
  # 1.5.1.1 - 2026-04-04
8
46
 
9
47
  - 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.