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

Databricks Dialect, Count() Validation #1755

Closed
harryaultdev opened this issue Jun 11, 2023 · 2 comments
Closed

Databricks Dialect, Count() Validation #1755

harryaultdev opened this issue Jun 11, 2023 · 2 comments

Comments

@harryaultdev
Copy link

Quick issue or me being stupid.

Using the Databricks Dialect I get a parse failure with count() when it involves multiple columns, it’s returning a validation error stating count can only accept one argument.

In SparkSQL Count(a.Id,a.test) is perfectly valid though.

@tobymao
Copy link
Owner

tobymao commented Jun 11, 2023

can you show the documentation where this is legal?

@harryaultdev
Copy link
Author

harryaultdev commented Jun 11, 2023

Yeah sure you can find it here! Not painfully obvious and a a bit of a niche usecase. Would just return a count where all the expressions / columns are not null. Think it might be Databricks specific.

https://docs.databricks.com/sql/language-manual/functions/count.html

image

adrianisk pushed a commit to adrianisk/sqlglot that referenced this issue Jun 21, 2023
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

2 participants