parthchandra commented on code in PR #4047:
URL: https://github.com/apache/datafusion-comet/pull/4047#discussion_r3139926613
##########
spark/src/main/spark-4.0/org/apache/spark/sql/comet/shims/ShimSparkErrorConverter.scala:
##########
@@ -292,17 +293,13 @@ trait ShimSparkErrorConverter {
case "FileNotFound" =>
val msg = params("message").toString
- // Extract file path from native error message and format like Hadoop's
- // FileNotFoundException: "File <path> does not exist"
val path = ShimSparkErrorConverter.ObjectLocationPattern
.findFirstMatchIn(msg)
.map(_.group(1))
.getOrElse(msg)
- // readCurrentFileNotFoundError was removed in Spark 4.0; construct
directly
Some(
- new SparkFileNotFoundException(
- errorClass = "_LEGACY_ERROR_TEMP_2055",
- messageParameters = Map("message" -> s"File $path does not
exist")))
+ QueryExecutionErrors
+ .fileNotExistError(path, new FileNotFoundException(s"File $path
does not exist")))
Review Comment:
I think Spark 4.0 will use - FAILED_READ_FILE.FILE_NOT_EXIST instead of the
legacy error class. Not a blocker (See
https://github.com/apache/spark/blob/c241d5ad4a2372bbddc7dd8339987a09f501dc36/sql/catalyst/src/main/scala/org/apache/spark/sql/errors/QueryExecutionErrors.scala#L879)
--
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]