{"action":"created","comment":{"url":"https://api.github.com/repos/linkedin/pinot/pulls/comments/96794378","pull_request_review_id":17386331,"id":96794378,"diff_hunk":"@@ -0,0 +1,138 @@\n+/**\n+ * Copyright (C) 2014-2016 LinkedIn Corp. (pinot-core@linkedin.com)\n+ *\n+ * Licensed under the Apache License, Version 2.0 (the \"License\");\n+ * you may not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *\n+ *         http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ */\n+package com.linkedin.pinot.core.plan;\n+\n+import com.linkedin.pinot.common.request.AggregationInfo;\n+import com.linkedin.pinot.common.request.BrokerRequest;\n+import com.linkedin.pinot.common.request.GroupBy;\n+import com.linkedin.pinot.common.request.transform.TransformExpressionTree;\n+import com.linkedin.pinot.core.common.Operator;\n+import com.linkedin.pinot.core.indexsegment.IndexSegment;\n+import com.linkedin.pinot.core.operator.MProjectionOperator;\n+import com.linkedin.pinot.core.operator.aggregation.function.AggregationFunctionFactory;\n+import com.linkedin.pinot.core.operator.transform.TransformExpressionOperator;\n+import com.linkedin.pinot.pql.parsers.Pql2Compiler;\n+import java.util.ArrayList;\n+import java.util.Arrays;\n+import java.util.HashSet;\n+import java.util.List;\n+import java.util.Set;\n+import javax.annotation.Nonnull;\n+import org.slf4j.Logger;\n+import org.slf4j.LoggerFactory;\n+\n+\n+/**\n+ * The <code>TransformPlanNode</code> class provides the execution plan for transforms on a single segment.\n+ */\n+public class TransformPlanNode implements PlanNode {\n+  private static final Logger LOGGER = LoggerFactory.getLogger(TransformPlanNode.class);\n+\n+  private final IndexSegment _indexSegment;","path":"pinot-core/src/main/java/com/linkedin/pinot/core/plan/TransformPlanNode.java","position":44,"original_position":44,"commit_id":"cd1ca2e63638c3058855100a5005da86ef2a87f3","original_commit_id":"cd1ca2e63638c3058855100a5005da86ef2a87f3","user":{"login":"mayankshriv","id":12615885,"avatar_url":"https://avatars.githubusercontent.com/u/12615885?v=3","gravatar_id":"","url":"https://api.github.com/users/mayankshriv","html_url":"https://github.com/mayankshriv","followers_url":"https://api.github.com/users/mayankshriv/followers","following_url":"https://api.github.com/users/mayankshriv/following{/other_user}","gists_url":"https://api.github.com/users/mayankshriv/gists{/gist_id}","starred_url":"https://api.github.com/users/mayankshriv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mayankshriv/subscriptions","organizations_url":"https://api.github.com/users/mayankshriv/orgs","repos_url":"https://api.github.com/users/mayankshriv/repos","events_url":"https://api.github.com/users/mayankshriv/events{/privacy}","received_events_url":"https://api.github.com/users/mayankshriv/received_events","type":"User","site_admin":false},"body":"Yeah, it does not need to be cached, I can just cache the segment name.","created_at":"2017-01-19T05:29:53Z","updated_at":"2017-01-19T05:29:53Z","html_url":"https://github.com/linkedin/pinot/pull/967#discussion_r96794378","pull_request_url":"https://api.github.com/repos/linkedin/pinot/pulls/967","_links":{"self":{"href":"https://api.github.com/repos/linkedin/pinot/pulls/comments/96794378"},"html":{"href":"https://github.com/linkedin/pinot/pull/967#discussion_r96794378"},"pull_request":{"href":"https://api.github.com/repos/linkedin/pinot/pulls/967"}}},"pull_request":{"url":"https://api.github.com/repos/linkedin/pinot/pulls/967","id":101999024,"html_url":"https://github.com/linkedin/pinot/pull/967","diff_url":"https://github.com/linkedin/pinot/pull/967.diff","patch_url":"https://github.com/linkedin/pinot/pull/967.patch","issue_url":"https://api.github.com/repos/linkedin/pinot/issues/967","number":967,"state":"open","locked":false,"title":"Add Transform support into query planning and execution phase.","user":{"login":"mayankshriv","id":12615885,"avatar_url":"https://avatars.githubusercontent.com/u/12615885?v=3","gravatar_id":"","url":"https://api.github.com/users/mayankshriv","html_url":"https://github.com/mayankshriv","followers_url":"https://api.github.com/users/mayankshriv/followers","following_url":"https://api.github.com/users/mayankshriv/following{/other_user}","gists_url":"https://api.github.com/users/mayankshriv/gists{/gist_id}","starred_url":"https://api.github.com/users/mayankshriv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mayankshriv/subscriptions","organizations_url":"https://api.github.com/users/mayankshriv/orgs","repos_url":"https://api.github.com/users/mayankshriv/repos","events_url":"https://api.github.com/users/mayankshriv/events{/privacy}","received_events_url":"https://api.github.com/users/mayankshriv/received_events","type":"User","site_admin":false},"body":"1. TransformPlanNode introduced between ProjectionPlanNode and upper\nlayers.\n\n2. As a result of '1' above, TransformOperator introduced between\nProjectionOperator and upper layers. For queries without transforms, the\nTransformOperator is a pass-through to the ProjectionOperator.\n\n3. Add TransformBlockValSet to represent results of Transform\nevaluation.\n\n4. Modified GroupByAstNode so that groupByExpressions now contain\ncolumns without expressions as well, to maintain relative ordering.\n\n5. Add unit test that tests a transform on group-by column.","created_at":"2017-01-18T04:47:09Z","updated_at":"2017-01-19T05:29:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d92c9b50fd5f0c5a45f79bb2e8a575c42b908748","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/linkedin/pinot/pulls/967/commits","review_comments_url":"https://api.github.com/repos/linkedin/pinot/pulls/967/comments","review_comment_url":"https://api.github.com/repos/linkedin/pinot/pulls/comments{/number}","comments_url":"https://api.github.com/repos/linkedin/pinot/issues/967/comments","statuses_url":"https://api.github.com/repos/linkedin/pinot/statuses/cd1ca2e63638c3058855100a5005da86ef2a87f3","head":{"label":"linkedin:transform-udf-pr","ref":"transform-udf-pr","sha":"cd1ca2e63638c3058855100a5005da86ef2a87f3","user":{"login":"linkedin","id":357098,"avatar_url":"https://avatars.githubusercontent.com/u/357098?v=3","gravatar_id":"","url":"https://api.github.com/users/linkedin","html_url":"https://github.com/linkedin","followers_url":"https://api.github.com/users/linkedin/followers","following_url":"https://api.github.com/users/linkedin/following{/other_user}","gists_url":"https://api.github.com/users/linkedin/gists{/gist_id}","starred_url":"https://api.github.com/users/linkedin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/linkedin/subscriptions","organizations_url":"https://api.github.com/users/linkedin/orgs","repos_url":"https://api.github.com/users/linkedin/repos","events_url":"https://api.github.com/users/linkedin/events{/privacy}","received_events_url":"https://api.github.com/users/linkedin/received_events","type":"Organization","site_admin":false},"repo":{"id":19961085,"name":"pinot","full_name":"linkedin/pinot","owner":{"login":"linkedin","id":357098,"avatar_url":"https://avatars.githubusercontent.com/u/357098?v=3","gravatar_id":"","url":"https://api.github.com/users/linkedin","html_url":"https://github.com/linkedin","followers_url":"https://api.github.com/users/linkedin/followers","following_url":"https://api.github.com/users/linkedin/following{/other_user}","gists_url":"https://api.github.com/users/linkedin/gists{/gist_id}","starred_url":"https://api.github.com/users/linkedin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/linkedin/subscriptions","organizations_url":"https://api.github.com/users/linkedin/orgs","repos_url":"https://api.github.com/users/linkedin/repos","events_url":"https://api.github.com/users/linkedin/events{/privacy}","received_events_url":"https://api.github.com/users/linkedin/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/linkedin/pinot","description":"A realtime distributed OLAP datastore","fork":false,"url":"https://api.github.com/repos/linkedin/pinot","forks_url":"https://api.github.com/repos/linkedin/pinot/forks","keys_url":"https://api.github.com/repos/linkedin/pinot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/linkedin/pinot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/linkedin/pinot/teams","hooks_url":"https://api.github.com/repos/linkedin/pinot/hooks","issue_events_url":"https://api.github.com/repos/linkedin/pinot/issues/events{/number}","events_url":"https://api.github.com/repos/linkedin/pinot/events","assignees_url":"https://api.github.com/repos/linkedin/pinot/assignees{/user}","branches_url":"https://api.github.com/repos/linkedin/pinot/branches{/branch}","tags_url":"https://api.github.com/repos/linkedin/pinot/tags","blobs_url":"https://api.github.com/repos/linkedin/pinot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/linkedin/pinot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/linkedin/pinot/git/refs{/sha}","trees_url":"https://api.github.com/repos/linkedin/pinot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/linkedin/pinot/statuses/{sha}","languages_url":"https://api.github.com/repos/linkedin/pinot/languages","stargazers_url":"https://api.github.com/repos/linkedin/pinot/stargazers","contributors_url":"https://api.github.com/repos/linkedin/pinot/contributors","subscribers_url":"https://api.github.com/repos/linkedin/pinot/subscribers","subscription_url":"https://api.github.com/repos/linkedin/pinot/subscription","commits_url":"https://api.github.com/repos/linkedin/pinot/commits{/sha}","git_commits_url":"https://api.github.com/repos/linkedin/pinot/git/commits{/sha}","comments_url":"https://api.github.com/repos/linkedin/pinot/comments{/number}","issue_comment_url":"https://api.github.com/repos/linkedin/pinot/issues/comments{/number}","contents_url":"https://api.github.com/repos/linkedin/pinot/contents/{+path}","compare_url":"https://api.github.com/repos/linkedin/pinot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/linkedin/pinot/merges","archive_url":"https://api.github.com/repos/linkedin/pinot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/linkedin/pinot/downloads","issues_url":"https://api.github.com/repos/linkedin/pinot/issues{/number}","pulls_url":"https://api.github.com/repos/linkedin/pinot/pulls{/number}","milestones_url":"https://api.github.com/repos/linkedin/pinot/milestones{/number}","notifications_url":"https://api.github.com/repos/linkedin/pinot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/linkedin/pinot/labels{/name}","releases_url":"https://api.github.com/repos/linkedin/pinot/releases{/id}","deployments_url":"https://api.github.com/repos/linkedin/pinot/deployments","created_at":"2014-05-19T23:27:48Z","updated_at":"2017-01-19T01:52:37Z","pushed_at":"2017-01-19T02:31:06Z","git_url":"git://github.com/linkedin/pinot.git","ssh_url":"git@github.com:linkedin/pinot.git","clone_url":"https://github.com/linkedin/pinot.git","svn_url":"https://github.com/linkedin/pinot","homepage":"https://github.com/linkedin/pinot/wiki","size":136493,"stargazers_count":1398,"watchers_count":1398,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":239,"mirror_url":null,"open_issues_count":84,"forks":239,"open_issues":84,"watchers":1398,"default_branch":"master"}},"base":{"label":"linkedin:master","ref":"master","sha":"011302d31ddc1dbfe0590fc02719d6775e153c67","user":{"login":"linkedin","id":357098,"avatar_url":"https://avatars.githubusercontent.com/u/357098?v=3","gravatar_id":"","url":"https://api.github.com/users/linkedin","html_url":"https://github.com/linkedin","followers_url":"https://api.github.com/users/linkedin/followers","following_url":"https://api.github.com/users/linkedin/following{/other_user}","gists_url":"https://api.github.com/users/linkedin/gists{/gist_id}","starred_url":"https://api.github.com/users/linkedin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/linkedin/subscriptions","organizations_url":"https://api.github.com/users/linkedin/orgs","repos_url":"https://api.github.com/users/linkedin/repos","events_url":"https://api.github.com/users/linkedin/events{/privacy}","received_events_url":"https://api.github.com/users/linkedin/received_events","type":"Organization","site_admin":false},"repo":{"id":19961085,"name":"pinot","full_name":"linkedin/pinot","owner":{"login":"linkedin","id":357098,"avatar_url":"https://avatars.githubusercontent.com/u/357098?v=3","gravatar_id":"","url":"https://api.github.com/users/linkedin","html_url":"https://github.com/linkedin","followers_url":"https://api.github.com/users/linkedin/followers","following_url":"https://api.github.com/users/linkedin/following{/other_user}","gists_url":"https://api.github.com/users/linkedin/gists{/gist_id}","starred_url":"https://api.github.com/users/linkedin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/linkedin/subscriptions","organizations_url":"https://api.github.com/users/linkedin/orgs","repos_url":"https://api.github.com/users/linkedin/repos","events_url":"https://api.github.com/users/linkedin/events{/privacy}","received_events_url":"https://api.github.com/users/linkedin/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/linkedin/pinot","description":"A realtime distributed OLAP datastore","fork":false,"url":"https://api.github.com/repos/linkedin/pinot","forks_url":"https://api.github.com/repos/linkedin/pinot/forks","keys_url":"https://api.github.com/repos/linkedin/pinot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/linkedin/pinot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/linkedin/pinot/teams","hooks_url":"https://api.github.com/repos/linkedin/pinot/hooks","issue_events_url":"https://api.github.com/repos/linkedin/pinot/issues/events{/number}","events_url":"https://api.github.com/repos/linkedin/pinot/events","assignees_url":"https://api.github.com/repos/linkedin/pinot/assignees{/user}","branches_url":"https://api.github.com/repos/linkedin/pinot/branches{/branch}","tags_url":"https://api.github.com/repos/linkedin/pinot/tags","blobs_url":"https://api.github.com/repos/linkedin/pinot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/linkedin/pinot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/linkedin/pinot/git/refs{/sha}","trees_url":"https://api.github.com/repos/linkedin/pinot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/linkedin/pinot/statuses/{sha}","languages_url":"https://api.github.com/repos/linkedin/pinot/languages","stargazers_url":"https://api.github.com/repos/linkedin/pinot/stargazers","contributors_url":"https://api.github.com/repos/linkedin/pinot/contributors","subscribers_url":"https://api.github.com/repos/linkedin/pinot/subscribers","subscription_url":"https://api.github.com/repos/linkedin/pinot/subscription","commits_url":"https://api.github.com/repos/linkedin/pinot/commits{/sha}","git_commits_url":"https://api.github.com/repos/linkedin/pinot/git/commits{/sha}","comments_url":"https://api.github.com/repos/linkedin/pinot/comments{/number}","issue_comment_url":"https://api.github.com/repos/linkedin/pinot/issues/comments{/number}","contents_url":"https://api.github.com/repos/linkedin/pinot/contents/{+path}","compare_url":"https://api.github.com/repos/linkedin/pinot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/linkedin/pinot/merges","archive_url":"https://api.github.com/repos/linkedin/pinot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/linkedin/pinot/downloads","issues_url":"https://api.github.com/repos/linkedin/pinot/issues{/number}","pulls_url":"https://api.github.com/repos/linkedin/pinot/pulls{/number}","milestones_url":"https://api.github.com/repos/linkedin/pinot/milestones{/number}","notifications_url":"https://api.github.com/repos/linkedin/pinot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/linkedin/pinot/labels{/name}","releases_url":"https://api.github.com/repos/linkedin/pinot/releases{/id}","deployments_url":"https://api.github.com/repos/linkedin/pinot/deployments","created_at":"2014-05-19T23:27:48Z","updated_at":"2017-01-19T01:52:37Z","pushed_at":"2017-01-19T02:31:06Z","git_url":"git://github.com/linkedin/pinot.git","ssh_url":"git@github.com:linkedin/pinot.git","clone_url":"https://github.com/linkedin/pinot.git","svn_url":"https://github.com/linkedin/pinot","homepage":"https://github.com/linkedin/pinot/wiki","size":136493,"stargazers_count":1398,"watchers_count":1398,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":239,"mirror_url":null,"open_issues_count":84,"forks":239,"open_issues":84,"watchers":1398,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/linkedin/pinot/pulls/967"},"html":{"href":"https://github.com/linkedin/pinot/pull/967"},"issue":{"href":"https://api.github.com/repos/linkedin/pinot/issues/967"},"comments":{"href":"https://api.github.com/repos/linkedin/pinot/issues/967/comments"},"review_comments":{"href":"https://api.github.com/repos/linkedin/pinot/pulls/967/comments"},"review_comment":{"href":"https://api.github.com/repos/linkedin/pinot/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/linkedin/pinot/pulls/967/commits"},"statuses":{"href":"https://api.github.com/repos/linkedin/pinot/statuses/cd1ca2e63638c3058855100a5005da86ef2a87f3"}}}}
{"actor":{"display_login":"mayankshriv"}}