Github user viirya commented on a diff in the pull request: https://github.com/apache/spark/pull/21235#discussion_r186241582 --- 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") --- End diff -- If we want to clearly state it, how about `'$operation' does not support bucketBy and sortBy right now`? So to avoid confusing with general sorting.
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org