{"action":"created","issue":{"url":"https://api.github.com/repos/apache/spark/issues/11965","repository_url":"https://api.github.com/repos/apache/spark","labels_url":"https://api.github.com/repos/apache/spark/issues/11965/labels{/name}","comments_url":"https://api.github.com/repos/apache/spark/issues/11965/comments","events_url":"https://api.github.com/repos/apache/spark/issues/11965/events","html_url":"https://github.com/apache/spark/pull/11965","id":143593341,"number":11965,"title":"[SPARK-14159][ML] Fixed bug in StringIndexer + related issue in RFormula","user":{"login":"jkbradley","id":5084283,"avatar_url":"https://avatars.githubusercontent.com/u/5084283?v=3","gravatar_id":"","url":"https://api.github.com/users/jkbradley","html_url":"https://github.com/jkbradley","followers_url":"https://api.github.com/users/jkbradley/followers","following_url":"https://api.github.com/users/jkbradley/following{/other_user}","gists_url":"https://api.github.com/users/jkbradley/gists{/gist_id}","starred_url":"https://api.github.com/users/jkbradley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jkbradley/subscriptions","organizations_url":"https://api.github.com/users/jkbradley/orgs","repos_url":"https://api.github.com/users/jkbradley/repos","events_url":"https://api.github.com/users/jkbradley/events{/privacy}","received_events_url":"https://api.github.com/users/jkbradley/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-03-25T20:43:42Z","updated_at":"2016-03-25T20:47:35Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/11965","html_url":"https://github.com/apache/spark/pull/11965","diff_url":"https://github.com/apache/spark/pull/11965.diff","patch_url":"https://github.com/apache/spark/pull/11965.patch"},"body":"## What changes were proposed in this pull request?\r\n\r\nStringIndexerModel.transform sets the output column metadata to use name inputCol.  It should not.  Fixing this causes a problem with the metadata produced by RFormula.\r\n\r\nFix in RFormula: I added the StringIndexer columns to prefixesToRewrite, and I modified VectorAttributeRewriter to find and replace all \"prefixes\" since attributes collect multiple prefixes from StringIndexer + Interaction.\r\n\r\nNote that \"prefixes\" is no longer accurate since internal strings may be replaced.\r\n\r\n## How was this patch tested?\r\n\r\nUnit test which failed before this fix."},"comment":{"url":"https://api.github.com/repos/apache/spark/issues/comments/201492625","html_url":"https://github.com/apache/spark/pull/11965#issuecomment-201492625","issue_url":"https://api.github.com/repos/apache/spark/issues/11965","id":201492625,"user":{"login":"SparkQA","id":8108735,"avatar_url":"https://avatars.githubusercontent.com/u/8108735?v=3","gravatar_id":"","url":"https://api.github.com/users/SparkQA","html_url":"https://github.com/SparkQA","followers_url":"https://api.github.com/users/SparkQA/followers","following_url":"https://api.github.com/users/SparkQA/following{/other_user}","gists_url":"https://api.github.com/users/SparkQA/gists{/gist_id}","starred_url":"https://api.github.com/users/SparkQA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SparkQA/subscriptions","organizations_url":"https://api.github.com/users/SparkQA/orgs","repos_url":"https://api.github.com/users/SparkQA/repos","events_url":"https://api.github.com/users/SparkQA/events{/privacy}","received_events_url":"https://api.github.com/users/SparkQA/received_events","type":"User","site_admin":false},"created_at":"2016-03-25T20:47:35Z","updated_at":"2016-03-25T20:47:35Z","body":"**[Test build #54210 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/54210/consoleFull)** for PR 11965 at commit [`36bf730`](https://github.com/apache/spark/commit/36bf7307338c5d0eba953f5ee53ee9e2d889db3a)."}}