Skip to content

Enable placement on more scalar_fns to allow lowering and pushdown to TableScans #25036

Description

@joseph-isaacs

We should use the new placement API for more scalar fns. This allows better query plans for example in vortex we get a large speed up for clickbench query q29 (below) when pushing down OCTET_LENGTH("URL") since we never need load the URL str bytes

SELECT "CounterID", AVG(OCTET_LENGTH("URL")) AS l, COUNT(*) AS c FROM hits WHERE "URL" <> '' GROUP BY "CounterID" HAVING COUNT(*) > 100000 ORDER BY l DESC LIMIT 25; -- ClickHouse's length counts bytes, not code points as standard SQL.

Scalar fn:

  • bit/octet/''-length
  • todo

Please add any more and we can update the list

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions