Skip to content

Commit c09a644

Browse files
committed
Fix LoadTableException again
1 parent 73a1df3 commit c09a644

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

sql/pipelines/src/main/scala/org/apache/spark/sql/pipelines/graph/PipelinesErrors.scala

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
package org.apache.spark.sql.pipelines.graph
1919

20+
import org.apache.spark.SparkException
2021
import org.apache.spark.sql.AnalysisException
2122
import org.apache.spark.sql.catalyst.TableIdentifier
2223

@@ -37,10 +38,12 @@ case class UnresolvedDatasetException(identifier: TableIdentifier)
3738
* @param name The name of the table
3839
* @param cause The cause of the failure
3940
*/
40-
case class LoadTableException(name: String, override val cause: Option[Throwable])
41-
extends AnalysisException(s"Failed to load table '$name'", cause = cause)
42-
43-
41+
case class LoadTableException(name: String, cause: Option[Throwable])
42+
extends SparkException(
43+
errorClass = "INTERNAL_ERROR",
44+
messageParameters = Map("message" -> s"Failed to load table '$name'"),
45+
cause = cause.orNull
46+
)
4447

4548
/**
4649
* Exception raised when a pipeline has one or more flows that cannot be resolved

0 commit comments

Comments
 (0)