awdavidson commented on PR #36150:
URL: https://github.com/apache/spark/pull/36150#issuecomment-1098237275
> @awdavidson the `stack` approach allows for the most concise
implementation of `melt` / `unpivot`. Thanks for sharing! But every user of
Spark has to come up with an implementation, understand it, test it.
>
> As a side note: Since `stack` is only accessible through `expr("...")`,
implementations of that approach are likely to introduce SQL injection
vulnerabilities. Is there any reason why there is no
`org.apache.spark.sql.functions.stack`?
Yes good point. I am not sure why `stack` is not in
`org.apache.spark.sql.functions` - it's actually not that complex to add. That
would then avoid the SQL injection vulnerabilities
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]