Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid window definitions in sqlite #764

Open
uttarayan21 opened this issue Apr 9, 2024 · 0 comments
Open

Invalid window definitions in sqlite #764

uttarayan21 opened this issue Apr 9, 2024 · 0 comments

Comments

@uttarayan21
Copy link

Description

According to the window-defn page in sqlite.org
All window definitions in sqlite should have a brace around them
but the generated sql for sqlite doesn't do that.

Steps to Reproduce

Use sea_query::query::SelectStatement::window function and build the sql query for sqlite

Expected Behavior

FROM
    "image_metadata" AS "meta"
    INNER JOIN "image_core_metadata" AS "core_meta" ON "meta"."image" = "core_meta"."image"
WHERE
    "meta"."dupe" IS NOT NULL 
WINDOW "d_time" AS (PARTITION BY "meta"."dupe" ORDER BY "core_meta"."timestamp" ASC)

Actual Behavior

FROM
    "image_metadata" AS "meta"
    INNER JOIN "image_core_metadata" AS "core_meta" ON "meta"."image" = "core_meta"."image"
WHERE
    "meta"."dupe" IS NOT NULL 
WINDOW "d_time" AS PARTITION BY "meta"."dupe" ORDER BY "core_meta"."timestamp" ASC

Reproduces How Often

Always reproduced

Versions

Using sea-query 0.30.7

Additional Information

I'll provide a minimal reproducible example soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant