Github user viirya commented on the issue:

    https://github.com/apache/spark/pull/17819
  
    Sorry I have to reply on a phone, so I may not write codes smoothly.
    
    What I mean it doesn't break binary compatibility, is the existing users
    codes using Bucketizer don't need to recompile. If you want to use new
    inputCols stuff, of course you need to recompile your codes. I think this
    is what about binary compatibility, isn't?
    
    
    
    On Sep 19, 2017 9:13 AM, "WeichenXu" <notificati...@github.com> wrote:
    
    @viirya <https://github.com/viirya> Scala with trait is a complex mechanism
    and trait isn't equivalent to java's interface. Scala compiler will
    precompile and generate many other codes, so java-side code cannot directly
    call methods in with trait. In order to test this, you can modify this file
    and add a line:
    
    --- 
a/examples/src/main/java/org/apache/spark/examples/ml/JavaBucketizerExample.java
    +++ 
b/examples/src/main/java/org/apache/spark/examples/ml/JavaBucketizerExample.java
    @@ -59,7 +59,8 @@ public class JavaBucketizerExample {
         Bucketizer bucketizer = new Bucketizer()
           .setInputCol("features")
           .setOutputCol("bucketedFeatures")
    -      .setSplits(splits);
    +      .setSplits(splits)
    +      .setInputCols(new String[] {"features", "features2"});
    
         // Transform original data into its bucket index.
         Dataset<Row> bucketedData = bucketizer.transform(dataFrame);
    
    and you will find this Java class compile failed.
    
    —
    You are receiving this because you were mentioned.
    Reply to this email directly, view it on GitHub
    <https://github.com/apache/spark/pull/17819#issuecomment-330399059>, or mute
    the thread
    
<https://github.com/notifications/unsubscribe-auth/AAEM9yeUnEowP2PhdXG2XF9DvRcVkg4Tks5sjxUrgaJpZM4NNEr5>
    .



---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to