panbingkun commented on code in PR #36350:
URL: https://github.com/apache/spark/pull/36350#discussion_r860393036
##########
sql/core/src/test/scala/org/apache/spark/sql/errors/QueryExecutionErrorsSuite.scala:
##########
@@ -424,4 +424,17 @@ class QueryExecutionErrorsSuite
matchMsg = true
)
}
+
+ test("UNSUPPORTED_SAVE_MODE: unsupported null saveMode") {
+ withTempPath { path =>
+ val e = intercept[SparkIllegalStateException] {
+ val saveMode: SaveMode = null
Review Comment:
SaveMode only have four value,
https://github.com/apache/spark/blob/master/sql/core/src/main/java/org/apache/spark/sql/SaveMode.java#L27~L57
Append, Overwrite, ErrorIfExists, Ignore
According to the following code, only can trigger
QueryExecutionErrors.unsupportedSaveModeError when SaveMode = null.
https://github.com/apache/spark/blob/master/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/InsertIntoHadoopFsRelationCommand.scala#L114~L138
--
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]