MaxGekk commented on code in PR #49233:
URL: https://github.com/apache/spark/pull/49233#discussion_r1893025455
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/csv/CSVFileFormat.scala:
##########
@@ -86,7 +86,7 @@ class CSVFileFormat extends TextBasedFileFormat with
DataSourceRegister {
}
override def getFileExtension(context: TaskAttemptContext): String = {
- ".csv" + CodecStreams.getCompressionExtension(context)
+ "." + csvOptions.fileExtension +
CodecStreams.getCompressionExtension(context)
Review Comment:
In this way, the user can overwrite almost anything in the file system:
```
./../../../../../path/<file to overwrite>.xz
```
Should we do some sanity check of the option?
--
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]