pola-rs / polars

Dataframes powered by a multithreaded, vectorized query engine, written in Rust
https://docs.pola.rs
Other
29.47k stars 1.87k forks source link

rename π to selected_columns and σ to filters in logal graph dot? #16735

Open raybellwaves opened 3 months ago

raybellwaves commented 3 months ago

Description

The first time I saw π and σ in a graph viz (dot) e.g. https://pola.rs/_astro/optimized.e46e3f3c_ZSiab5.svg I was confused as what they meant. In the text (https://pola.rs/posts/polars_birds_eye_view/) I understood the represent selected_columns and filters, respectively. I wonder for simplification of a new user if they should be renamed to the plain language terms? It looks like the text box is wider enough to contain the text. Apologies if i'm missing something in the meaning of the symbols if they are preferred. You are welcome to close this out if that is the case

Link

No response

datenzauberai commented 3 months ago

These are the symbols from relational algebra, that is taught in many computer science courses on relational databases. See https://en.wikipedia.org/wiki/Projection_(relational_algebra) and https://en.wikipedia.org/wiki/Selection_(relational_algebra)

raybellwaves commented 3 months ago

These are the symbols from relational algebra, that is taught in many computer science courses on relational databases. See https://en.wikipedia.org/wiki/Projection_(relational_algebra) and https://en.wikipedia.org/wiki/Selection_(relational_algebra)

Cool. Thanks for sharing

stinodego commented 3 months ago

I do agree that human-readable is probably better than using pi/sigma. These didn't mean anything to me when I started using Polars. But as @datenzauberai pointed out, there is a good reason these symbols are being used.

ritchie46 commented 3 months ago

I want to keep the output concise in the graphs. Would be cool if we could add a legend though.