logoalt Hacker News

world2vectoday at 10:28 AM2 repliesview on HN

There's no way SQL is more unreadable than polars. IMO it's the other way around.


Replies

benruttertoday at 10:47 AM

> There's no way SQL is more unreadable than polars. IMO it's the other way around.

I think on basic queries, SQL is really nice, but when stuff gets more complex, with a bunch of CTEs, let alone functions requiring loops, it becomes pretty obtuse.

sanderjdtoday at 2:06 PM

I would say that it is easier to decompose polars (and all dataframe api) queries and to build them up from pieces than it is to do the same with sql. Any time I find myself writing more than five or so lines of sql, or especially building a sql string in parts with logic, I wish I had a dataframe api instead. But the reverse is also somewhat true, that simpler and explicit expressions are nicer with sql.