[ 
https://issues.apache.org/jira/browse/SPARK-26315?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16720369#comment-16720369
 ] 

ASF GitHub Bot commented on SPARK-26315:
----------------------------------------

jerryjch opened a new pull request #23313: [SPARK-26315][PYSPARk] auto cast 
threshold from Integer to Float in approxSimilarityJoin of 
BucketedRandomProjectionLSHModel
URL: https://github.com/apache/spark/pull/23313
 
 
   
   ## What changes were proposed in this pull request?
   
   If the input parameter 'threshold' to the function approxSimilarityJoin is 
not a float, we would get an exception.  The fix is to convert the 'threshold' 
into a float before calling the java implementation method.
   
   ## How was this patch tested?
   
   Added a new test case.  Without this fix, the test will throw an exception 
as reported in the JIRA. With the fix, the test passes.
   
   Please review http://spark.apache.org/contributing.html before opening a 
pull request.
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> auto cast threshold from Integer to Float in approxSimilarityJoin of 
> BucketedRandomProjectionLSHModel
> -----------------------------------------------------------------------------------------------------
>
>                 Key: SPARK-26315
>                 URL: https://issues.apache.org/jira/browse/SPARK-26315
>             Project: Spark
>          Issue Type: Improvement
>          Components: MLlib, PySpark
>    Affects Versions: 2.3.2
>            Reporter: Song Ci
>            Priority: Major
>
> when I was using 
> {code:java}
> // code placeholder
> BucketedRandomProjectionLSHModel.approxSimilarityJoin(dt_features, 
> dt_features, distCol="EuclideanDistance", threshold=20.)
> {code}
> I was confused then that this method reported an exception some java method 
> (dataset, dataset, integer, string) fingerprint can not be found.... I think 
> if I give an integer, and the python method of pyspark should be auto-cast 
> this to float if needed. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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

Reply via email to