Skip to content

Improve vectorized operations of GroupColumn #13275

Open

Description

@Rachelint

Is your feature request related to a problem or challenge?

Some good points about improving vectorized operations of GroupColumn from @Dandandan and @jayzhan211 in #12996 :

#12996 (comment)
#12996 (comment)
#12996 (comment)
#12996 (comment)

This pr is for tracking such points for conintuing improving performace of multi group by.

Describe the solution you'd like

No response

Describe alternatives you've considered

No response

Additional context

No response

Activity

  1. Rachelint commented on Nov 28, 2024

    @Rachelint
    ContributorAuthor

    I tried the possible optimizations forvectorized_equal_to:
    #12996 (comment)
    #12996 (comment)

    But unfortunately seems no obvious improvement in clickbench, tpch and so on... although some improvement can see in benchmark for the function in #13539

    For take + eq, use eq in arrow kernel indeed can get performance improve, but the cost of take seems unacceptable...

    For optimizations for special case of input array (like all rows in the array needed, no nulls although it is nullable), it can see some improvement in the benchmark for function, but see no improvement in e2e benchmark(clickbench, tpch). I guess they may be not the hot path...

    I plan to not make further attempts recently...

    cc @Dandandan @alamb @jayzhan211

  2. Rachelint commented on Nov 28, 2024

    @Rachelint
    ContributorAuthor

    I tried the possible optimizations forvectorized_equal_to: #12996 (comment) #12996 (comment)

    But unfortunately seems no obvious improvement in clickbench, tpch and so on... although some improvement can see in benchmark for the function in #13539

    For take + eq, use eq in arrow kernel indeed can get performance improve, but the cost of take seems unacceptable...

    For optimizations for special case of input array (like all rows in the array needed, no nulls although it is nullable), it can see some improvement in the benchmark for function, but see no improvement in e2e benchmark(clickbench, tpch). I guess they may be not the hot path...

    I plan to not make further attempts recently...

    cc @Dandandan @alamb @jayzhan211

    @LeslieKid maybe you can try it if some other possible optimizations not included above.

  3. Dandandan commented on Nov 29, 2024

    @Dandandan
    Contributor

    Thanks @Rachelint for summarizing, that's interesting. One big difference between take + eq in join versus grouped aggregates seems to be that the ValueBuilders already are type erased, so maybe there is nothing to gain (and using take and eq just creates an extra copy.

    It seems for the join code, this could actually be used more (and joining on string columns might be not so fast at the moment).

  4. Rachelint commented on Nov 29, 2024

    @Rachelint
    ContributorAuthor

    Thanks @Rachelint for summarizing, that's interesting. One big difference between take + eq in join versus grouped aggregates seems to be that the ValueBuilders already are type erased, so maybe there is nothing to gain (and using take and eq just creates an extra copy.

    It seems for the join code, this could actually be used more (and joining on string columns might be not so fast at the moment).

    🤔 I think maybe we can indeed try some solutions without take in join? @LeslieKid seems trying it.

  5. Dandandan commented on Nov 29, 2024

    @Dandandan
    Contributor

    Yeah som experiments around that would be nice.

    Also see this issue:
    #12131

  6. Dandandan commented on Nov 29, 2024

    @Dandandan
    Contributor

    Oh I saw @LeslieKid already commented on that issue 👍

  7. LeslieKid commented on Nov 29, 2024

    @LeslieKid
    Contributor

    🤔 I think maybe we can indeed try some solutions without take in join? @LeslieKid seems trying it.

    Yes, I am working on comparing arrays with indices in a for-loop (similar to the implementation of vectorized_equal_to() in multi group-by) instead of using take in hash join. See #13607

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

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions