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

bug: ibis bigquery failed for recursive CTE #10252

Open
1 task done
ruiyang2015 opened this issue Sep 29, 2024 · 0 comments
Open
1 task done

bug: ibis bigquery failed for recursive CTE #10252

ruiyang2015 opened this issue Sep 29, 2024 · 0 comments
Labels
bug Incorrect behavior inside of ibis

Comments

@ruiyang2015
Copy link

What happened?

for BigQuery,
if we use a Recursive CTE statement something like this:

WITH RECURSIVE
  CTE_1 AS (
    (SELECT 1 AS iteration UNION ALL SELECT 1 AS iteration)
    UNION ALL
    SELECT iteration + 1 AS iteration FROM CTE_1 WHERE iteration < 3
  )
SELECT iteration FROM CTE_1
ORDER BY 1 ASC

if we try to get the the ibis SQL expression, we will get an error of

WITH RECURSIVE is only allowed at the top level of the SELECT

The problem seems caused by ibis.sql() function will wrap a 'select * from ()'
instead of directly using the raw query passed in.

It will be good to not wrap this select * to avoid such issue.

What version of ibis are you using?

9.2.0

What backend(s) are you using, if any?

BigQuery

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@ruiyang2015 ruiyang2015 added the bug Incorrect behavior inside of ibis label Sep 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Incorrect behavior inside of ibis
Projects
Status: backlog
Development

No branches or pull requests

1 participant