Skip to content

Conversation

@NickCrews
Copy link
Contributor

This is a sanity check. If sqlglot tells us we are generating invalid SQL, then we should be handling it better.

I'm not sure how CI will like this. Potentially this will reveal a lot of bad assumptions we have been making.

My other motivation here is that if we merge this, then we can push more logic down into SQLglot. For example, if tobymao/sqlglot#6377 gets merged, then we can rely on sqlglot to tell us that column.first(include_nulls=False) is illegal to compile on postgres (only column.first(include_nulls=True) is possible to correctly compile. Currently, we have to do these sorts of checks in our individual backend compilers, for example see #11311

@cpcloud
Copy link
Member

cpcloud commented Nov 20, 2025

Wow, I am surprised that only 2 backends failed with this enabled!

@NickCrews
Copy link
Contributor Author

@cpcloud if I fix those failing tests then does this seem like a good idea?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

sql Backends that generate SQL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants