herringbone 0.9.0 → 0.9.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c59941b3e4ed776a03d3596bf8b9288dd852b89f49934dfb1110f6b29d527ab8
4
- data.tar.gz: 13ef32e91a12a11d249be06834f0c33dfb70c9ebb7746d29d28844f9af180fa5
3
+ metadata.gz: 14cacf678c274af811c0ba7cf8d2810f251655fe8c0f8a80411d714170ade738
4
+ data.tar.gz: c9ae864f1f2a15ba9972bd742556a909a534077aac7251c26841054b3e173e2e
5
5
  SHA512:
6
- metadata.gz: '083624f293ce5d1825c9f6998e46b6e58767e9bbec15d6adbbd1cb556ef3771d2a0426a41ba8f097a43b2b937bef55ce018a01925a7df2d9f9d8d36a1b4f8da9'
7
- data.tar.gz: 38b917be5c728a3837d3eafae3e9f060708574f5c6249792219d17a410a4fe14683df46dfd4b922d3bf4503a327a2384105c950e06ca1523a7482c042629f367
6
+ metadata.gz: 9767ea6bb316dd5271ab1ced6476587036aaaaae7439b95d9d39ad721f2ada4af4514d75d1274d030c7ebe041a2f76b22a69ee34bd35b6a49f6941f9ed75b3ce
7
+ data.tar.gz: 2487e14f78f16a8c2a823afc11b131f2bca9019ce54e4e6f52d423c1954715872ad2e9f1d9f5796674fdd70b34cd8780b5786b2b251bfa91f35f7a901d61d937
data/CHANGELOG.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 0.9.1
6
+
7
+ - `Herringbone.combine` works in Ractors other than the main one, and so does reading ZSTD without
8
+ `zstd-ruby`: a few internal tables were frozen only on the outside and raised
9
+ `Ractor::IsolationError`.
10
+
5
11
  ## 0.9.0
6
12
 
7
13
  - ZSTD files are read without the `zstd-ruby` gem, by a pure-Ruby decompressor; `zstd-ruby` is
data/MANUAL.md CHANGED
@@ -90,6 +90,11 @@ rows.each { |row| writer.send(Ractor.make_shareable(row)) }
90
90
  writer.send(:done)
91
91
  ```
92
92
 
93
+ Combining and redaction work from any Ractor as well. A `Herringbone::Redaction` made shareable
94
+ with `Ractor.make_shareable` can be passed to one, as long as it has no `replace` blocks: a block
95
+ keeps the `self` it was made with, which is not shareable. Build a redaction with blocks inside
96
+ the Ractor that applies it.
97
+
93
98
  Herringbone loads its parts on first use (`require "herringbone"` itself takes under a
94
99
  millisecond). Before Ruby 3.4, Ractors other than the main one cannot load code, so call
95
100
  `Herringbone.eager_load!` before starting them. It also moves all the loading to boot, for
@@ -45,14 +45,14 @@ module Herringbone
45
45
  MAX_OFFSET_CODE = 31
46
46
 
47
47
  # Predefined FSE distributions (RFC 8878 section 3.1.1.3.2.2), with their accuracy logs
48
- LL_DEFAULT = [[4, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 2,
49
- 1, 1, 1, 1, 1, -1, -1, -1, -1], 6].freeze
48
+ LL_DEFAULT = Ractor.make_shareable([[4, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 2,
49
+ 1, 1, 1, 1, 1, -1, -1, -1, -1], 6])
50
50
  # Predefined match length distribution and accuracy log
51
- ML_DEFAULT = [[1, 4, 3, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
52
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, -1, -1, -1, -1], 6].freeze
51
+ ML_DEFAULT = Ractor.make_shareable([[1, 4, 3, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
52
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, -1, -1, -1, -1], 6])
53
53
  # Predefined offset code distribution and accuracy log
54
- OF_DEFAULT = [[1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1,
55
- -1, -1, -1], 5].freeze
54
+ OF_DEFAULT = Ractor.make_shareable([[1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1,
55
+ -1, -1, -1], 5])
56
56
 
57
57
  module_function
58
58
 
@@ -46,7 +46,7 @@ module Herringbone
46
46
  Input = Struct.new(:reader, :copier, :sources, :report)
47
47
 
48
48
  # Closing paragraph of the message when inputs do not fit the output schema
49
- FIT_ADVICE = <<~ADVICE.chomp
49
+ FIT_ADVICE = <<~ADVICE.chomp.freeze
50
50
  Pass a schema every input fits (schema: :union makes one), or schema: :intersect to keep only
51
51
  the fields all inputs have.
52
52
  ADVICE
@@ -19,16 +19,16 @@ module Herringbone
19
19
  C = Format::ConvertedType
20
20
 
21
21
  # Converted integer annotations => [bit width, signed]
22
- INT_CONVERTED = {
22
+ INT_CONVERTED = Ractor.make_shareable({
23
23
  C::INT_8 => [8, true], C::INT_16 => [16, true], C::INT_32 => [32, true], C::INT_64 => [64, true],
24
24
  C::UINT_8 => [8, false], C::UINT_16 => [16, false], C::UINT_32 => [32, false], C::UINT_64 => [64, false]
25
- }.freeze
25
+ })
26
26
 
27
27
  # Converted annotations of time and timestamp columns => [kind, unit, adjusted to UTC]
28
- TIME_CONVERTED = {
28
+ TIME_CONVERTED = Ractor.make_shareable({
29
29
  C::TIME_MILLIS => [:time, :millis, true], C::TIME_MICROS => [:time, :micros, true],
30
30
  C::TIMESTAMP_MILLIS => [:timestamp, :millis, true], C::TIMESTAMP_MICROS => [:timestamp, :micros, true]
31
- }.freeze
31
+ })
32
32
 
33
33
  # Converted annotations of UTF-8 byte arrays => the text kind
34
34
  TEXT_CONVERTED = {C::UTF8 => :string, C::ENUM => :enum, C::JSON => :json}.freeze
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Herringbone
4
4
  # Gem version, also written to the +created_by+ field of every file's footer
5
- VERSION = "0.9.0"
5
+ VERSION = "0.9.1"
6
6
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: herringbone
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Julik Tarkhanov
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2026-10-17 00:00:00.000000000 Z
10
+ date: 2026-10-31 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: bigdecimal