logoalt Hacker News

refactor_mastertoday at 9:32 AM1 replyview on HN

The cool thing about polars is that you can conditionally collect expressions over many layers of business logic, and then compute the result at the end. Doing this in SQL ends up in a hodgepodge of strings and trimmed ends to please the syntax. You can also pretty effortlessly write quite complex conditionals directly in polars, and bridge it easily to the surrounding python.

I find that SQL is only easier to read with minimal abstraction, but as soon as the project gets bigger SQL becomes an unwieldy island of different that has served its purpose after we’re done with reading/writing the data.


Replies

fzumsteintoday at 9:56 AM

This sounds interesting! Do you have a specific example by any chance or blog post/doc references?

show 1 reply