4 ms·
I had a quick look at some online material on implementations of pivot, as well as what I consider my go-to reference [0] for Apache projects' SQL support (Apac
by nevi-me 8y ago
I had a quick look at some online material on implementations of pivot, as well as what I consider my go-to reference [0] for Apache projects' SQL support (Apache Calcite).
Looks like each DB has a proprietary way of pivoting, and I couldn't find anything on pivot in Calcite. Does anyone know if the SQL impl of pivot was created specifically for Spark, or whether it'd be upstreamed to Calcite? The benefit would be that other projects that rely on Calcite for SQL support would also have pivot capabilities. I'm thinking of Apache Beam.
- [0] https://calcite.apache.org/docs/reference.html https://calcite.apache.org/docs/reference.html
- reilly3000 8y agoThis article enlightened me on the underlying logic, as well as some different implementations. https://modern-sql.com/use-case/pivot https://modern-sql.com/use-case/pivot
- nevi-me 8y agoI was lazy to add its link, that's where I learnt about the proprietary implementations of various databases. I wonder if we'll ever get an ANSI-2019 SQL version that tries to merge what various DB vendors have branched off and done. Maybe it already exists? https://www.whoishostingthis.com/resources/ansi-sql-standards/ https://www.whoishostingthis.com/resources/ansi-sql-standard...
- rxin 8y agoApache Spark doesn't use Calcite.