Canner / wren-engine

🤖 The semantic engine for LLMs, bringing semantic context to AI agents. 🔥
https://getwren.ai/oss
Apache License 2.0
129 stars 36 forks source link

Wren core transform SQL failed `Error during planning: cume_dist does not support zero arguments` #924

Open grieve54706 opened 3 days ago

grieve54706 commented 3 days ago
SELECT
    cume_dist() OVER (ORDER BY id) AS cume_dist 
FROM (
    SELECT 1 AS id, 'A' AS category UNION ALL
    SELECT 2 AS id, 'B' AS category UNION ALL
    SELECT 3 AS id, 'A' AS category UNION ALL
    SELECT 4 AS id, 'B' AS category UNION ALL
    SELECT 5 AS id, 'A' AS category
) AS t
DataFusion error: Error during planning: Error during planning: cume_dist does not support zero arguments. No function matches the given name and argument types 'cume_dist()'. You might need to add explicit type casts.
    Candidate functions:
    cume_dist(Any, .., Any)

Also other window functions too. dense_rank, percent_rank, rank, row_number.

BigQuery function reference https://cloud.google.com/bigquery/docs/reference/standard-sql/numbering_functions#cume_dist