Skip to content

feat: row and dataset hashing on one canonical row encoding - #2758

Merged
norberttech merged 5 commits into
1.xfrom
multiset-hashing
Nov 23, 2026
Merged

norberttech merged 5 commits into
1.xfrom
multiset-hashing

Conversation

@norberttech

@norberttech norberttech commented Nov 21, 2026 •

Copy link
Copy Markdown
Member

Resolves: #xxx

Change Log


Added

  • flow-php/etl - row_hash() scalar function, a typed xxh128 hash of the row
  • flow-php/etl - multiset_hash() aggregate, an order-independent hash of all rows
  • flow-php/etl - analyze()->withDatasetHash() and Report::datasetHash()
  • flow-php/etl - analyze()->withDatasetHash(ref('date')) hashes every partition of the output
  • flow-php/etl - Hash, PartitionHash and DatasetHash report types
  • flow-php/etl - DatasetHash::plus() combines the hashes of two runs
  • flow-php/etl - hash_algorithm() DSL function
  • flow-php/etl - Backend::rowHashes() and Backend::groupedMultisetHashes()
  • flow-php/flow-php-ext - native row hashes and grouped multiset hashes
  • flow-php/filesystem - an empty string is a valid partition value, written as the folder name=
  • flow-php/etl - Hashing documentation page

Fixed

  • flow-php/etl - detached XML elements are stored in canonical form
  • flow-php/etl - ExternalSortTest scripts its memory instead of reading the test process

Changed

  • flow-php/etl - group, join, distinct and bucket keys use one typed canonical encoding
  • flow-php/etl - keys have the declared type of their column
  • flow-php/etl - hash() takes an algorithm name
  • flow-php/etl - NativePHPHash renamed to PhpAlgorithm
  • flow-php/etl - PhpAlgorithm throws the Flow InvalidArgumentException
  • flow-php/flow-php-ext - ABI version 4
  • flow-php/flow-php-ext - group table and partitioning use the canonical key encoding

Removed

Deprecated

Security

- row_hash() scalar function and multiset_hash() aggregate
- analyze()->withDatasetHash() reports an order-independent dataset hash
- group, join, distinct and bucket keys use the same typed encoding
- keys have the declared type of their column
- flow_php extension hashes natively, ABI 4
- hash() takes an algorithm name, NativePHPHash renamed to PhpAlgorithm
- detached xml elements stored in canonical form
- unreachable legacy element physical form removed
@norberttech norberttech added this to the 0.49.0 milestone Nov 21, 2026
@codecov

codecov Bot commented Nov 21, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.88013% with 19 lines in your changes missing coverage. Please review.
✅ Project coverage is 91.13%. Comparing base (2766e0f) to head (273a29b).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@             Coverage Diff              @@
##                1.x    #2758      +/-   ##
============================================
+ Coverage     91.10%   91.13%   +0.02%     
- Complexity        0    32591   +32591     
============================================
  Files          2242     2256      +14     
  Lines         93524    94061     +537     
============================================
+ Hits          85209    85726     +517     
- Misses         8315     8335      +20     
Components Coverage Δ
etl 96.21% <96.79%> (-0.03%) ⬇️
cli 87.40% <ø> (ø)
lib-array-dot 96.52% <ø> (ø)
lib-azure-sdk 69.50% <ø> (ø)
lib-doctrine-dbal-bulk 94.44% <ø> (ø)
lib-filesystem 89.41% <100.00%> (+0.31%) ⬆️
lib-types 94.64% <ø> (ø)
lib-parquet 82.80% <ø> (ø)
lib-parquet-viewer 83.15% <ø> (ø)
lib-snappy 89.86% <ø> (ø)
lib-dremel 0.00% <ø> (ø)
lib-postgresql 90.55% <ø> (ø)
lib-telemetry 86.85% <ø> (ø)
bridge-filesystem-async-aws 96.85% <ø> (ø)
bridge-filesystem-azure 95.66% <ø> (ø)
bridge-filesystem-sftp 90.29% <ø> (ø)
bridge-monolog-http 96.84% <ø> (ø)
bridge-monolog-telemetry 92.85% <ø> (ø)
bridge-openapi-specification 91.95% <ø> (ø)
symfony-http-foundation 80.76% <ø> (ø)
bridge-symfony-console 98.01% <ø> (ø)
bridge-psr18-telemetry 100.00% <ø> (ø)
bridge-psr3-telemetry 98.95% <ø> (ø)
bridge-psr7-telemetry 100.00% <ø> (ø)
bridge-telemetry-otlp 90.11% <ø> (ø)
bridge-symfony-http-foundation-telemetry 92.85% <ø> (ø)
bridge-symfony-filesystem-bundle 93.19% <ø> (ø)
bridge-symfony-filesystem-cache 98.18% <ø> (ø)
bridge-symfony-postgresql-bundle 93.72% <ø> (ø)
bridge-symfony-postgresql-cache 94.41% <ø> (ø)
bridge-symfony-postgresql-messenger 98.80% <ø> (ø)
bridge-symfony-postgresql-session 93.65% <ø> (ø)
bridge-symfony-telemetry-bundle 90.76% <ø> (ø)
adapter-chartjs 82.46% <ø> (ø)
adapter-csv 97.68% <ø> (ø)
adapter-doctrine 95.19% <ø> (ø)
adapter-google-sheet 97.53% <ø> (ø)
adapter-http 87.40% <ø> (ø)
adapter-json 90.62% <ø> (ø)
adapter-logger 47.05% <ø> (ø)
adapter-parquet 96.95% <ø> (ø)
adapter-text 97.68% <ø> (ø)
adapter-xml 98.01% <ø> (ø)
adapter-avro 6.25% <ø> (ø)
adapter-excel 96.79% <ø> (ø)
adapter-postgresql 97.38% <ø> (ø)
adapter-seal 90.00% <ø> (ø)
bridge-phpunit-postgresql 75.30% <ø> (ø)
bridge-phpunit-telemetry 87.36% <ø> (ø)
bridge-phpstan-types 0.00% <ø> (ø)
bridge-postgresql-valinor 100.00% <ø> (ø)
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

- per-partition dataset hashes, combined with DatasetHash::plus()
- Hash, PartitionHash and DatasetHash report types
- multiset digest travels only as hex, Rust and PHP accept the same form
- empty string partition values written as name= and read back
- ExternalSortTest scripts its memory instead of reading the process
- row, group, run and partition hashes on one page with run examples
- null and empty partition values in partitioning
- MultisetHashAlgorithm: xxh128, md5, sha256
- withDatasetHash(array $partitions, MultisetHashAlgorithm $algorithm)
- DatasetHash reports its algorithm
- plus() refuses hashes of different algorithms
- flow_php extension hashes with the same algorithms
@norberttech
norberttech merged commit 9c51344 into 1.x Nov 23, 2026
27 checks passed
@norberttech
norberttech deleted the multiset-hashing branch November 23, 2026 16:59
@github-project-automation github-project-automation Bot moved this from Todo to Done in Roadmap Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant