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

offset with subquery generates incorrect code #2312

Closed
cpcloud opened this issue Sep 24, 2023 · 0 comments
Closed

offset with subquery generates incorrect code #2312

cpcloud opened this issue Sep 24, 2023 · 0 comments

Comments

@cpcloud
Copy link
Contributor

cpcloud commented Sep 24, 2023

Similar to #2248, offset with a subquery is generating incorrect code.

Fully reproducible code snippet

In [24]: import sqlglot as sg

In [25]: sg.__version__
Out[25]: '18.7.0'

In [26]: sg.select("*").from_("t").offset(sg.select("5").subquery()).sql("duckdb")
Out[26]: 'SELECT * FROM t(SELECT 5) OFFSET'

Official Documentation

N/A

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