Github user andrewor14 commented on a diff in the pull request:

    https://github.com/apache/spark/pull/13452#discussion_r65453530
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/DataFrameWriter.scala ---
    @@ -500,10 +500,10 @@ final class DataFrameWriter private[sql](df: 
DataFrame) {
             s"existing columns (${validColumnNames.mkString(", ")})"))
       }
     
    -  private def assertNotBucketed(): Unit = {
    +  private def assertNotBucketed(operation: String): Unit = {
         if (numBuckets.isDefined || sortColumnNames.isDefined) {
           throw new IllegalArgumentException(
    -        "Currently we don't support writing bucketed data to this data 
source.")
    +        s"'$operation' does not support bucketing right now.")
    --- End diff --
    
    It looks weird to pass in the operation as a string. Instead you can get 
the operation from the caller of `assertNotBucketed`, something like this: 
https://github.com/apache/spark/blob/master/core/src/main/scala/org/apache/spark/rdd/RDDOperationScope.scala#L103


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to