Skip to content

[FEA] Filter join probe table rows that contain nulls when nulls are not equal #9151

Open

Description

@jrhemstad

Is your feature request related to a problem? Please describe.

In the hash join implementation, we allow controlling the behavior of whether two null elements are considered equal. If nulls are not equal, then two rows that contain nulls can never be considered equal. We exploit this in the build phase of the hash join by constructing a bitmask from ANDing the bitmasks from all the input columns and using that "row bitmask" to filter out any rows that contain a null element from being inserted into the hash table.

When it comes time to probe the hash table, we do not currently take advantage of this some optimization.

Describe the solution you'd like

When probing the hash map and nulls are considered not equal, we should build bitmask from ANDing all of the bitmasks of the probe table and only probe the map when a row does not contain any nulls.

Additional context

The hash join implementation is currently going a complete refactor to use the cuCollections static_multimap. To support the filtered insert, we added an insert_if function. I think we can also add a retrieve_if function to support the filtered probing.

Activity

  1. added
    feature request
    libcudf
    Performance
    on Aug 31, 2021
  2. jrhemstad commented on Aug 31, 2021

    @jrhemstad
    ContributorAuthor

    @jlowe points out that both the hash_join constructor and the "probing" member functions allow specifying the null_equality parameter.

    This is problematic as a user could specify contradicting options in the build vs probe. The null_equality should be specified exactly once in the hash_join constructor and then stored for future probing operations.

  3. jlowe commented on Aug 31, 2021

    @jlowe
    Contributor

    Filed #9155 to track separately the potential null_equality parameter mismatch problem in the cudf::hash_join API.

  4. github-actions commented on Nov 15, 2021

    @github-actions

    This issue has been labeled inactive-30d due to no recent activity in the past 30 days. Please close this issue if no further response or action is needed. Otherwise, please respond with a comment indicating any updates or changes to the original issue and/or confirm this issue still needs to be addressed. This issue will be labeled inactive-90d if there is no activity in the next 60 days.

  5. github-actions commented on Feb 13, 2022

    @github-actions

    This issue has been labeled inactive-90d due to no recent activity in the past 90 days. Please close this issue if no further response or action is needed. Otherwise, please respond with a comment indicating any updates or changes to the original issue and/or confirm this issue still needs to be addressed.

  6. self-assigned this
    on Mar 15, 2022
  7. vyasr commented on Jul 15, 2022

    @vyasr
    Contributor

    @PointKernel I think we can close this now, right? Based on the work in #10248 we don't actually see a perf benefit here due to the effects on the performance of the hash map when the load factor is higher?

  8. PointKernel commented on Jul 15, 2022

    @PointKernel
    Member

    This feature is still desired since #10248 is the exploration to reduce actual map size (thus memory footprint) by using precomputed row bitmasks while the goal of this work is to perform conditional probing when nulls are present. The issue depends on NVIDIA/cuCollections#139.

  9. added
    0 - Backlog
    on Jun 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

0 - BacklogPerformancefeature requestlibcudf

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions