cloud-fan commented on a change in pull request #29543:
URL: https://github.com/apache/spark/pull/29543#discussion_r477044371
##########
File path: sql/core/src/main/scala/org/apache/spark/sql/DataFrameWriter.scala
##########
@@ -284,6 +284,11 @@ final class DataFrameWriter[T] private[sql](ds:
Dataset[T]) {
* @since 1.4.0
*/
def save(path: String): Unit = {
+ if (!df.sparkSession.sessionState.conf.legacyPathOptionBehavior &&
+ extraOptions.contains("path") && path.nonEmpty) {
+ throw new AnalysisException("There is a 'path' option set and save() is
called with a path " +
+ "parameter. Either remove the path option, or call save() without the
parameter.")
Review comment:
shall we also mention the legacy config in the error message?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]