Skip to content

Commit 6e3e4ef

Browse files
authored
Match table exhaustively for ConvertToDelta to avoid scala.MatchError (delta-io#3411)
## Description Make the match loop exhaustive to avoid scala.MatchError ## How was this patch tested? Existing Unit tests.
1 parent 2b2ef73 commit 6e3e4ef

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

spark/src/main/scala/org/apache/spark/sql/delta/commands/ConvertToDeltaCommand.scala

+4
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,10 @@ abstract class ConvertToDeltaCommandBase(
133133
case _: DeltaTableV2 =>
134134
// Already a Delta table
135135
None
136+
case other =>
137+
throw DeltaErrors.operationNotSupportedException(
138+
s"Converting an unsupported table type $other to a Delta table",
139+
tableIdentifier)
136140
}
137141
} else {
138142
Some(ConvertTarget(

0 commit comments

Comments
 (0)