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

    https://github.com/apache/spark/pull/10218#discussion_r47201429
  
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/DataFrame.scala ---
    @@ -1271,10 +1271,11 @@ class DataFrame private[sql](
        * @since 1.6.0
        */
       @scala.annotation.varargs
    -  def drop(colNames: String*): DataFrame = {
    +  def drop(colName: String, colNames: String*): DataFrame = {
    --- End diff --
    
    Just FYI, I am not too sure about all the versions but at least this works 
fine at Java 7 and Scala 2.10.4.
    
    - Scala
    ```scala
    class TestCompatibility {
      def test(a: String): Unit = {
        test(a, Seq(): _ *)
      }
      @varargs
      def test(a: String, b: String*): Unit = {
        (a +: b).foreach(println)
      }
      def test(a: Int): Unit = {
        test(Seq(a) : _ *)
      }
      @varargs
      def test(a: Int*): Unit = {
        a.foreach(println)
      }
    }
    ```
    
    - Java
    ```java
    public class Test {
        public static void main(String[] args) {
            new TestCompatibility().test("a");
            new TestCompatibility().test("a", "b");
            new TestCompatibility().test("a", "b", "c");
            new TestCompatibility().test(1);
            new TestCompatibility().test(1, 2);
            new TestCompatibility().test(1, 2, 3);
        }
    }
    ```


---
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