ibis icon indicating copy to clipboard operation
ibis copied to clipboard

test: error when sqlglot tells us a compilation is unsupported

Open NickCrews opened this issue 3 months ago • 2 comments

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 https://github.com/tobymao/sqlglot/pull/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 https://github.com/ibis-project/ibis/pull/11311

NickCrews avatar Nov 20 '25 20:11 NickCrews

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

cpcloud avatar Nov 20 '25 20:11 cpcloud

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

NickCrews avatar Nov 20 '25 21:11 NickCrews