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: The function parse_sql fails when COUNT(*) is in the query #9267

Open
1 task done
jpohanka opened this issue May 28, 2024 · 4 comments
Open
1 task done

bug: The function parse_sql fails when COUNT(*) is in the query #9267

jpohanka opened this issue May 28, 2024 · 4 comments
Labels
bug Incorrect behavior inside of ibis

Comments

@jpohanka
Copy link

What happened?

I have the following toy example of an unbounded table:

tx_schema = {
    "date_id": "date",
    "store_id": "int32",
    "sold_amount": "double",
    "quantity": "double",
}

tx = ibis.table(
    name="tx",
    schema=tx_schema
)

When I want parse the query SELECT COUNT(*) AS row_count FROM tx, it throws a Keyword: '' error, as was already reported here: #8597 (comment)

What version of ibis are you using?

9.0.0

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

None.

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@cpcloud
Copy link
Member

cpcloud commented May 29, 2024

@jpohanka Thanks for opening the issue!

Would you mind elaborating a bit on what you're using parse_sql for? Would love to hear about use cases in the wild.

@jpohanka
Copy link
Author

@cpcloud Currently just testing the functionality, but I could imagine some migrations of BI reports using raw SQL to Ibis expressions.

@cpcloud
Copy link
Member

cpcloud commented May 31, 2024

Roger that! It's definitely got a lot of potential.

@jpohanka
Copy link
Author

jpohanka commented Jun 1, 2024

@cpcloud I agree, among many things, it could serve as a common abstraction layer for creating SQL expressions over several database systems.

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

2 participants