The Polars vs SQL differences nobody is talking about
summary
Polars treats data as named, same-length columns so row order preserved unless explicitly changed, allows column-wise operations that can produce length-mismatches, and treats lit(1) as a scalar; SQL treats tables as unordered bags of rows, repeats literals per row, and keeps rows atomic causing different filter/aggregate outcomes. Empty aggregations yield 0 in Polars but NULL in SQL. A compatibility layer called Narwhals enforces rules (no length-changing expressions without aggregation, require ORDER BY for orderable aggs) to make ports safe.
AI-written summary · about
chapters (10)
- 0:00Polars vs SQL differences
- 1:51Why Polars and SQL matter
- 3:55Mental models for Polars and SQL
- 6:26Row order differences
- 8:55Column independence pitfalls
- 11:01Literal values in aggregations
- 12:44Bonus differences
- 16:36Narwhals abstraction
- 18:45Migration rules
- 19:49Q&A
related talks
44mPolars; DataFrames in the multi-core era
31mPolars on Spark
37mPolars 1.0 and beyond
01h 22mAn Introduction to Pandas 2, Polars, and DuckDB
42mPOLARDB architecture
29mBuild simple & scalable data pipelines with Polars & DeltaLake
01h 12mFrom Storage Formats to Open Governance: The Evolution to Apache Polaris
31mSQL to NoSQL to NewSQL and the rise of polyglot persistence Paul Dix
