itholic commented on code in PR #47885:
URL: https://github.com/apache/spark/pull/47885#discussion_r1740276890
##########
connector/protobuf/src/main/scala/org/apache/spark/sql/protobuf/utils/ProtobufUtils.scala:
##########
@@ -229,14 +229,18 @@ private[sql] object ProtobufUtils extends Logging {
}
def readDescriptorFileContent(filePath: String): Array[Byte] = {
- try {
- FileUtils.readFileToByteArray(new File(filePath))
- } catch {
- case ex: FileNotFoundException =>
- throw QueryCompilationErrors.cannotFindDescriptorFileError(filePath,
ex)
- case ex: NoSuchFileException =>
- throw QueryCompilationErrors.cannotFindDescriptorFileError(filePath,
ex)
- case NonFatal(ex) => throw
QueryCompilationErrors.descriptorParseError(ex)
+ if (filePath == null || filePath.isEmpty) {
Review Comment:
Ah, I think we should just revert this change. There was a bug when
accepting the empty value for the third argument at the first time, but it has
been fixed by addressing constructors.
--
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]