feat(physical-plan): Make HashTableLookupExpr serializable - #24382
feat(physical-plan): Make HashTableLookupExpr serializable#24382barbarj wants to merge 8 commits into
HashTableLookupExpr serializable#24382Conversation
|
Thank you for opening this pull request! Reviewer note: cargo-semver-checks reported the current version number is not SemVer-compatible with the changes in this pull request (compared against the base branch). Details |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #24382 +/- ##
==========================================
- Coverage 81.29% 81.16% -0.14%
==========================================
Files 1110 1110
Lines 385168 389445 +4277
Branches 385168 389445 +4277
==========================================
+ Hits 313111 316074 +2963
- Misses 53583 54774 +1191
- Partials 18474 18597 +123 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
| @@ -1291,3 +1219,28 @@ let table_opts = TableParquetOptions::try_from(&proto_table_opts)?; | |||
| ``` | |||
|
|
|||
| See [issue #24019](https://github.com/apache/datafusion/issues/24019) for details. | |||
|
|
|||
| ### `JoinHashMapType` has a new required method `hashes` | |||
There was a problem hiding this comment.
If this doesn't make it into 55.0, this will need to be moved to 55.1
|
@jayshrivastava, @barbarj, @adriangb: The deciding line between Given that, should the presence of a
|
|
I think the main thought behind the original design and split was that locally at least there's no point in building a Bloom filter if you already have a hash table in memory. It makes sense to me that if you want to serialize across the wire the tradeoff is very different, a bloom filter would be better. I'm not sure if that means you would want to build a Bloom filter upfront or build it when you serialize. |
Which issue does this PR close?
Rationale for this change
In order for DataFusion Distributed (and presumably other distributed DF projects) to make use of
HashTableLookupExpras a dynamic filter across network boundaries, it needs to be serializable. (for instance, see: datafusion-contrib/datafusion-distributed#623)What changes are included in this PR?
The only sticky part of serializing
HashTableLookupExpris itsMap. The inner members of the two variants ofMap,HashMapandArrayMapboth support much more functionality than is needed to evaluate this as a dynamic expression. So, in order to simply serialization and minimize the on-wire size, we serialize only the aspects required for expression evaluation (i.e. membership checks)We replace
HashTableLookupExpr'sMapwith a local version that includes the membership-only variants. These are implemented such that they are only constructible via deserialization.Are these changes tested?
The
roundtrip_hash_table_lookup_expr_to_littest is replaced with two regular roundtrip tests, one each for theHashMapandArrayMapversions ofHashTableLookupExpr.This PR also adds a bunch of tests testing the post-deserialization behavior of the new membership-only variants.
Are there any user-facing changes?
JoinHashMapTypehas a new required methodhashes