Github user viirya commented on a diff in the pull request: https://github.com/apache/spark/pull/21235#discussion_r186241694 --- Diff: sql/core/src/main/scala/org/apache/spark/sql/DataFrameWriter.scala --- @@ -339,9 +339,16 @@ final class DataFrameWriter[T] private[sql](ds: Dataset[T]) { } } - private def assertNotBucketed(operation: String): Unit = { - if (numBuckets.isDefined || sortColumnNames.isDefined) { - throw new AnalysisException(s"'$operation' does not support bucketing right now") + private def assertNotBucketedOrSorted(operation: String): Unit = { + (numBuckets.isDefined, sortColumnNames.isDefined) match { + case (true, true) => + throw new AnalysisException( + s"'$operation' does not support bucketing and sorting right now") + case (true, false) => + throw new AnalysisException(s"'$operation' does not support bucketing right now") + case (false, true) => + throw new AnalysisException(s"'$operation' does not support sorting right now") --- End diff -- Just `'$operation' does not support sortBy right now`?
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org