Skip to content

Aggregate pushdown for Wasm wrappers? #627

Description

@distanceqo

#586 added aggregate pushdown and the native wrappers got wired up (#596 for MySQL), but Wasm wrappers can't see any of it — types.wit only has quals, sorts and limit, so a guest never knows it's serving an aggregate.

Ran into this with the Langfuse wrapper from #622. select name, sum(total_cost) ... group by name paginates every trace and sums locally, even though the upstream API does it in one call:

GET /api/public/metrics?query={"view":"traces","dimensions":[{"field":"name"}],"metrics":[{"measure":"totalCost","aggregation":"sum"}]}

Is this on the roadmap, or out of scope on purpose? It'd be a breaking change to the WIT so I didn't want to just show up with a PR. Happy to take it on if you want it.

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