Skip to content

collection_size_threshold incorrectly used in supports_collect_by_size #8405

Closed

Description

@Dandandan

Describe the bug

In supports_collect_by_size, collection_size_threshold to compare the threshold for both total_byte_size (correct), but incorrectly as fallback for num_rows.
This leads to large planning differences for when estimated size is / is not available.

To Reproduce

Read the code.

Expected behavior

As a first step, introduce hash_join_single_partition_threshold_rows, being number of times (e.g. 10x) smaller than the number of bytes. Adapt hash_join_single_partition_threshold as well (may need to increase it).

We also can improve the estimation of size by improving the estimation.

Additional context

No response

Activity

  1. changed the title [-]collection_size_threshold incorrectly used[/-] [+]`collection_size_threshold` incorrectly used[/+] on Dec 3, 2023
  2. changed the title [-]`collection_size_threshold` incorrectly used[/-] [+]`collection_size_threshold` incorrectly used in `supports_collect_by_size`[/+] on Dec 3, 2023
  3. maruschin commented on Jan 2, 2024

    @maruschin
    Contributor

    @Dandandan, hi!

    I created a draft pull request, did I understand the idea correctly?

  4. Dandandan commented on Jan 21, 2024

    @Dandandan
    ContributorAuthor

    Thank you @maruschin <3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingperformanceMake DataFusion faster

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions