umbrellio-utils 1.16.2 → 1.17.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.
- checksums.yaml +4 -4
- data/.github/workflows/release.yml +3 -43
- data/Gemfile.lock +1 -1
- data/README.md +1 -1
- data/lib/umbrellio_utils/click_house/backends/base.rb +8 -3
- data/lib/umbrellio_utils/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5da47e7215c62353c7682a24fd57420b09af5f55ba37ffc11658a4a6ba51d5b0
|
|
4
|
+
data.tar.gz: 6026f030b0eac12fec699b847a28744e41d9120c236aef1aa0a311fb3b43d732
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7c3d87cc1f6597a2adf44e9e0ef7110e69ea9c6855c02e6987d853529eabdf135a7cd3a267f626c1b0fab581f191efcf4d2b5aab40cf5f42755efe78d4aa7018
|
|
7
|
+
data.tar.gz: 13c9d2306c4736234dd3ecb648d9a79f6c297d5b17911ed7f2c0ee342b2ff29ed21315c151c78ab07014c551ae8683bb55fddab172603d21d490b9b56f33757a
|
|
@@ -7,48 +7,8 @@ on:
|
|
|
7
7
|
|
|
8
8
|
jobs:
|
|
9
9
|
release:
|
|
10
|
-
runs-on: ubuntu-latest
|
|
11
10
|
permissions:
|
|
12
11
|
contents: write
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
- name: Extract version
|
|
17
|
-
id: version
|
|
18
|
-
run: |
|
|
19
|
-
version=$(grep -oP '(?<=VERSION = ")[^"]+' lib/umbrellio_utils/version.rb)
|
|
20
|
-
echo "tag=v$version" >> "$GITHUB_OUTPUT"
|
|
21
|
-
|
|
22
|
-
- name: Check if release already exists
|
|
23
|
-
id: check
|
|
24
|
-
run: |
|
|
25
|
-
if gh release view "${{ steps.version.outputs.tag }}" &>/dev/null; then
|
|
26
|
-
echo "exists=true" >> "$GITHUB_OUTPUT"
|
|
27
|
-
else
|
|
28
|
-
echo "exists=false" >> "$GITHUB_OUTPUT"
|
|
29
|
-
fi
|
|
30
|
-
env:
|
|
31
|
-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
32
|
-
|
|
33
|
-
- uses: ruby/setup-ruby@v1
|
|
34
|
-
if: steps.check.outputs.exists == 'false'
|
|
35
|
-
with:
|
|
36
|
-
ruby-version: "3.4"
|
|
37
|
-
bundler-cache: true
|
|
38
|
-
|
|
39
|
-
- name: Build gem
|
|
40
|
-
if: steps.check.outputs.exists == 'false'
|
|
41
|
-
run: gem build umbrellio_utils.gemspec
|
|
42
|
-
|
|
43
|
-
- name: Push gem to RubyGems
|
|
44
|
-
if: steps.check.outputs.exists == 'false'
|
|
45
|
-
run: gem push *.gem
|
|
46
|
-
env:
|
|
47
|
-
GEM_HOST_API_KEY: ${{ secrets.GEM_HOST_API_KEY }}
|
|
48
|
-
|
|
49
|
-
- uses: softprops/action-gh-release@v3
|
|
50
|
-
if: steps.check.outputs.exists == 'false'
|
|
51
|
-
with:
|
|
52
|
-
tag_name: ${{ steps.version.outputs.tag }}
|
|
53
|
-
files: "*.gem"
|
|
54
|
-
generate_release_notes: true
|
|
12
|
+
uses: umbrellio/github-workflows/.github/workflows/gem-release.yml@v1
|
|
13
|
+
secrets:
|
|
14
|
+
GEM_HOST_API_KEY: ${{ secrets.GEM_HOST_API_KEY }}
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
|
@@ -142,7 +142,7 @@ The sorting key, version column and `is_deleted` column are read from `system.ta
|
|
|
142
142
|
|
|
143
143
|
`is_deleted` is applied after the boundary for exactly that reason, and is omitted when the engine declares no such column.
|
|
144
144
|
|
|
145
|
-
Two chain methods are handled rather than passed through, because the dedup subquery has to control them: the subquery always projects `SELECT *` (so the outer query can still filter on `is_deleted` and on columns you did not select) and any projection you set is re-applied outside it; and the version ordering leads the subquery's `ORDER BY`, since it decides which row survives,
|
|
145
|
+
Two chain methods are handled rather than passed through, because the dedup subquery has to control them: the subquery always projects `SELECT *` (so the outer query can still filter on `is_deleted` and on columns you did not select) and any projection you set is re-applied outside it; and the version ordering leads the subquery's `ORDER BY`, since it decides which row survives. Equal versions are resolved as FINAL resolves them: the greater partition ID wins (`_partition_id DESC`), then the last inserted row within a partition (`_block_number DESC`), and any ordering you set comes last. The `_block_number` virtual column needs ClickHouse 23.9 or later.
|
|
146
146
|
|
|
147
147
|
`#deduplicate` raises on a table it cannot collapse — a non-Replacing engine, a Replacing engine declared without a version argument, or a dataset that is not a single table source (joined, multi-source, or a subquery).
|
|
148
148
|
|
|
@@ -92,11 +92,16 @@ module UmbrellioUtils
|
|
|
92
92
|
# filter on `is_deleted` and so a caller's projection still resolves;
|
|
93
93
|
# that projection is re-applied outside instead.
|
|
94
94
|
#
|
|
95
|
-
#
|
|
96
|
-
#
|
|
95
|
+
# Equal versions are resolved as FINAL does: the greater partition ID,
|
|
96
|
+
# then the last insert within it. The caller's ordering comes last.
|
|
97
97
|
def deduplicated_source(meta)
|
|
98
98
|
clone(select: nil)
|
|
99
|
-
.order(
|
|
99
|
+
.order(
|
|
100
|
+
Sequel.desc(meta.version),
|
|
101
|
+
Sequel.desc(:_partition_id),
|
|
102
|
+
Sequel.desc(:_block_number),
|
|
103
|
+
*@opts[:order],
|
|
104
|
+
)
|
|
100
105
|
.limit_by(*meta.sorting_key.map { |expr| Sequel.lit(expr) })
|
|
101
106
|
end
|
|
102
107
|
|