258 points · by tosh · 9mo ago · 72 comments
Yet today I feel it was 2016 dataders who is the crazy one lol
Really, prefer DuckDB SQL these days for anything that needs to perform well, and feel like SQL is easier to grok than python code most of the time.
I switched to this as well and its mainly because explorations would need to be translated to SQL for production anyways. If I start with pandas I just need to do all the work twice.
(if you have already done so and it wasn't resolved, feel free to ping me on it)
I thought a colleague of mine had filed an issue but I didn’t find it. I filed it myself just now: https://github.com/apache/arrow/issues/49310
feather is optimized for fast reading
Feather might be a better fit for sime yse cases, but parquet has fantastic support and is still a pretty good choice for things that feather does.
Unless they're really focussed on eaking out every bit of read performance, people often opt for the well supported path instead.
Arrow is also directly usable as the application memory model. It’s pretty common to read Parquet into Arrow for transport.
It’s pretty common to read Parquet into Arrow for transport.
I'm confused by this. Are you referring to Arrow Flight RPC? Or are you saying distributed analytic engine use arrow to transport parquet between queries?
Recently we have started documenting this to better inform choices: https://parquet.apache.org/docs/file-format/implementationst...
It's very neat for some types of data to have columns contiguous in memory.
That's not really the purpose; it's really a language-independent format so that you don't need to change it for say, a dataframe or R. It's columnar because for analytics (where you do lots of aggregations and filtering) this is way more performant; the data is intentionally stored so the target columns are continuous. You probably already know, but the analytics equivalent of SQLite is DuckDB. Arrow can also eliminate the need to serialize/de-serialize data when sharing (ex: a high performance data pipeline) because different consumers / tools / operations can use the same memory representation as-is.
Not sure if I misunderstood, what are the chances those different consumers / tools / operations are running in your memory space?
You still have to transfer the data, but you remove the need for a transformation before writing to the wire, and a transformation when reading from the wire.
The key phrase though would seem to be “memory representation”m and not “same memory”. You can spit the in-memory representation out to an Arrow file or an Arrow stream, take it in, and it’s in the same memory layout in the other program. That’s kind of the point of Arrow. It’s a standard memory layout available across applications and even across languages, which can be really convenient.
You can also store arrow on disk but it is mainly used as in-memory representation.
it's actually many things IPC protocol wire protocol, database connectivity spec etc etc.
in reality it's about an in-memory tabular (columnar) representation that enables zero copy operations b/w languages and engines.
and, imho, it all really comes down to standard data types for columns!
Also, a good proportion of web apis are sending pretty small data sizes. On mass there might be an improvement if everything was more efficiently represented, but evaluating on a case by case basis, the data size often isn't the bottleneck.