[
https://issues.apache.org/jira/browse/S2GRAPH-237?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16601881#comment-16601881
]
DOYUNG YOON commented on S2GRAPH-237:
-------------------------------------
[~djfwan]
It seems like passing `inputDF` into `ALSModelProcess.buildAnnoyIndex` method
is a bug as you explained.
I guess `inputDF` should be replaced to `df` variable.
Can you please send PR to fix this?
> Refactor unused variable on AnnoyIndexBuildSink class
> -----------------------------------------------------
>
> Key: S2GRAPH-237
> URL: https://issues.apache.org/jira/browse/S2GRAPH-237
> Project: S2Graph
> Issue Type: Bug
> Reporter: Hwansung Yu
> Assignee: Hwansung Yu
> Priority: Minor
>
> {code:java}
> val df = repartition(preprocess(inputDF),
> inputDF.sparkSession.sparkContext.defaultParallelism)
> if (inputDF.isStreaming) throw new IllegalStateException("AnnoyIndexBuildSink
> can not be run as streaming.")
> else {
> ALSModelProcess.buildAnnoyIndex(conf, inputDF)
> }
> {code}
> In "write" method of AnnoyIndexBuildSink class, variable "df" is never used.
> So, repartition does not working .
> I think that second parameter of buildAnnoyIndex shoule be "df", not
> "inputDF".
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)