News for hackers. Stuff that matters.
Re:Parquet: More than just “Turbo CSV” by agiacalone on Monday April 03, 2023 @08:01PM (#35433188)
I feel like there’s some unsaid intrinsic value to having text-based files versus a compiled format like parquet. Size and speed aren’t nearly as critical when size is small, and this seems like adding unneeded complexity for all but some specialized use cases.
Re:Parquet: More than just “Turbo CSV” by rcoveson on Monday April 03, 2023 @08:20PM (#35433338)
"Unsaid"? I have the opposite perspective: This is repeated ad nauseam. Every time a binary format or any other complex optimization is mentioned, the performance-doesn't-matter people have to come out of the woodwork and bring up the fact that it "literally doesn't matter" to "$INVENTED_HIGH_PERCENTAGE of use cases".

I wonder, do people on the Caterpillar forum have this problem, where people just show up to ask, "Yeah but can you take it on the freeway? Because I can take my Tacoma on the freeway."

Re:Parquet: More than just “Turbo CSV” by agiacalone on Monday April 03, 2023 @09:15PM (#35433709)
I’m confused. Are you advocating for complexity regardless of need?
Re:Parquet: More than just “Turbo CSV” by rcoveson on Monday April 03, 2023 @09:31PM (#35433819)
How could anybody advocate for "complexity regardless of need"? What would that even look like?

Maybe you were being sarcastic, I'm not sure. But I hope it's obvious that advocating for complexity at all is not the same thing as advocating for complexity regardless of need.

Re:Parquet: More than just “Turbo CSV” by FridgeSeal on Monday April 03, 2023 @11:29PM (#35434669)
If you are under the impression that CSV’s-and-friends are “less complex” because they’re text, I would like to assure you that any “simplicity” in the existing text formats is a heinous lie, and the complexity gets pushed into the code of the consuming layer.

I use parquet for small stuff now, because it’s standardised and so much nicer and more reliable to use. It’s faster. It ships a schema. There’s actual data type support. There’s even partitioning support if you need it. It’s quite literally better in every useful way.

Long winded way of saying: the complexity has always been there. CSV’s act as if it’s not there, parquet acknowledges it and gives you the tools to deal with it.

Re:Parquet: More than just “Turbo CSV” by syntheweave on Monday April 03, 2023 @11:41PM (#35434753)
The angle by which CSV is simple is in the flexibility of input...that is, it's a very decent authoring format, when sent into a system that knows how to import and validate "that kind of CSV" and treat it the way all user interfaces should treat input - with an eye towards telling the user where they screwed up.

Once you've got the data into a processing pipeline you do need additional semantic structure to not lose integrity, which I think Parquet is fine for, but any SQL schema will also do.

Re:Parquet: More than just “Turbo CSV” by cout on Tuesday April 04, 2023 @04:21AM (#35436635)
Parquet is not better than csv in every useful way.

CSV, being row-oriented, makes it much easier to append data than parquet, which is column-oriented.

CSV is also supported by decades of software, much of which either predates parquet or does not yet support parquet.

CSV, being a newline-delimited text-based format, is much better suited for inclusion in a git repository than parquet.

I use parquet wherever I can, but I still reach for csv whenever it makes sense.

Re:Parquet: More than just “Turbo CSV” by heavenlyblue on Tuesday April 04, 2023 @07:47AM (#35438107)
> CSV is also supported by decades of software, much of which either predates parquet or does not yet support parquet.

CSV can not be supported by any software because it's not really a format. If you don't understand what I am saying by this, please write down an algorithm for figuring out which type of quoting is used in a given CSV file. Also please explain to me how you would deal with new lines in the text data.

Re:Parquet: More than just “Turbo CSV” by yardstick on Tuesday April 04, 2023 @06:01AM (#35437319)
I’ve come here to ask why CSV is being used? CSV is easy for humans to read, and works in almost any tool. It’s Excel friendly (yes Excel has some terrible CSV/data mangling practices).

End of the day, if the format needs to be used by arbitrary third parties who maybe/probably have no technical experience beyond excel, then CSV is the best option.

If human readable and Excel support are not required, then by all means Parquet is the winner.

TLDR: The best format depends on how you need to use the data.

Re:Parquet: More than just “Turbo CSV” by whakim on Monday April 03, 2023 @10:05PM (#35434033)
TFA never claimed that parquet is superior to csv in all cases. If you have a small file or you just want to be able to read the file, then by all means use a csv. Is your argument that we shouldn't bother developing or talking about specialized file formats because they're overkill in the most common case?
Re:Parquet: More than just “Turbo CSV” by chrismorgan on Monday April 03, 2023 @11:36PM (#35434719)
There are also significant disadvantages to text formats, most obviously in the area of compatibility. They’re easy enough that people have a dreadful habit of ignoring specs (if they even exist) and introducing incompatibilities, which are not uncommonly even security vulnerabilities (e.g. HTTP request smuggling).

CSV is a very good demonstration of these problems.

Binary formats tend to be quite a bit more robust, with a much higher average quality of implementation, because they’re harder to work with.

Re:Parquet: More than just “Turbo CSV” by never_inline on Monday April 03, 2023 @11:58PM (#35434855)
> because they’re harder to work with

Or rather because parsing human readable text comes with many edge cases, than encoding stuff into binary.

Re:Parquet: More than just “Turbo CSV” by chrismorgan on Tuesday April 04, 2023 @01:53AM (#35435638)
It’s easy enough to write an exact spec. People are just much less inclined to, and even if they do people are much less inclined to follow it.