{"action":"created","comment":{"url":"https://api.github.com/repos/SnappyDataInc/snappydata/pulls/comments/210838673","pull_request_review_id":147137881,"id":210838673,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxMDgzODY3Mw==","diff_hunk":"@@ -70,7 +70,13 @@ class CachedDataFrame(snappySession: SnappySession, queryExecution: QueryExecuti\n   private[sql] final def isCached: Boolean = cachedRDD ne null\n \n   private def getExecRDD: RDD[InternalRow] =\n-    if (isCached) cachedRDD else queryExecution.executedPlan.execute()\n+    if (isCached) {\n+      cachedRDD\n+    } else {\n+      snappySession.sessionState.\n+          executePlan(queryExecution.logical).executedPlan.execute()\n+    }\n+","path":"core/src/main/scala/org/apache/spark/sql/CachedDataFrame.scala","position":11,"original_position":11,"commit_id":"83528728c145468d5a6af9c47f6a4433fc3c316b","original_commit_id":"83528728c145468d5a6af9c47f6a4433fc3c316b","user":{"login":"rishitesh","id":793775,"node_id":"MDQ6VXNlcjc5Mzc3NQ==","avatar_url":"https://avatars0.githubusercontent.com/u/793775?v=4","gravatar_id":"","url":"https://api.github.com/users/rishitesh","html_url":"https://github.com/rishitesh","followers_url":"https://api.github.com/users/rishitesh/followers","following_url":"https://api.github.com/users/rishitesh/following{/other_user}","gists_url":"https://api.github.com/users/rishitesh/gists{/gist_id}","starred_url":"https://api.github.com/users/rishitesh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rishitesh/subscriptions","organizations_url":"https://api.github.com/users/rishitesh/orgs","repos_url":"https://api.github.com/users/rishitesh/repos","events_url":"https://api.github.com/users/rishitesh/events{/privacy}","received_events_url":"https://api.github.com/users/rishitesh/received_events","type":"User","site_admin":false},"body":"It still does not fail with plan caching enabled. One of the plans is the NonRecursive plan which assumes plan caching is enabled, hence it has started failing now. Same with CodeGenFallback.","created_at":"2018-08-17T08:26:58Z","updated_at":"2018-08-17T08:26:58Z","html_url":"https://github.com/SnappyDataInc/snappydata/pull/1119#discussion_r210838673","pull_request_url":"https://api.github.com/repos/SnappyDataInc/snappydata/pulls/1119","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/SnappyDataInc/snappydata/pulls/comments/210838673"},"html":{"href":"https://github.com/SnappyDataInc/snappydata/pull/1119#discussion_r210838673"},"pull_request":{"href":"https://api.github.com/repos/SnappyDataInc/snappydata/pulls/1119"}},"in_reply_to_id":210834201},"pull_request":{"url":"https://api.github.com/repos/SnappyDataInc/snappydata/pulls/1119","id":206296572,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA2Mjk2NTcy","html_url":"https://github.com/SnappyDataInc/snappydata/pull/1119","diff_url":"https://github.com/SnappyDataInc/snappydata/pull/1119.diff","patch_url":"https://github.com/SnappyDataInc/snappydata/pull/1119.patch","issue_url":"https://api.github.com/repos/SnappyDataInc/snappydata/issues/1119","number":1119,"state":"open","locked":false,"title":"[SNAP-2457] Apply plan caching only for JDBC queries","user":{"login":"rishitesh","id":793775,"node_id":"MDQ6VXNlcjc5Mzc3NQ==","avatar_url":"https://avatars0.githubusercontent.com/u/793775?v=4","gravatar_id":"","url":"https://api.github.com/users/rishitesh","html_url":"https://github.com/rishitesh","followers_url":"https://api.github.com/users/rishitesh/followers","following_url":"https://api.github.com/users/rishitesh/following{/other_user}","gists_url":"https://api.github.com/users/rishitesh/gists{/gist_id}","starred_url":"https://api.github.com/users/rishitesh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rishitesh/subscriptions","organizations_url":"https://api.github.com/users/rishitesh/orgs","repos_url":"https://api.github.com/users/rishitesh/repos","events_url":"https://api.github.com/users/rishitesh/events{/privacy}","received_events_url":"https://api.github.com/users/rishitesh/received_events","type":"User","site_admin":false},"body":"## Changes proposed in this pull request\r\nThis PR will enable plan caching at SnappySession layer, only for JDBC queries which are routed.\r\nFor all other queries from jobs/local mode/connector won't have cached plan. \r\nThe reason being plan caching breaks if a user performs any transformation after the CachedDataFrame is obtained e.g. df.repartition(), which is a very typical usage pattern.\r\n\r\nThis will degrade the performance of queries by around 30ms if fired from spark programs like Snappy jobs, connector mode or local mode. The behavior can be overridden by setting snappydata.sql.planCaching=true.\r\n\r\nFixed one issue with the fallback plan where the same query execution was being used for re-execution.\r\n\r\n## Patch testing\r\n\r\n(Fill in the details about how this patch was tested)\r\n\r\n## ReleaseNotes.txt changes\r\n\r\n(Does this change require an entry in ReleaseNotes.txt? If yes, has it been added to it?)\r\n\r\n## Other PRs \r\n\r\n(Does this change require changes in other projects- store, spark, spark-jobserver, aqp? Add the links of PR of the other subprojects that are related to this change)\r\n","created_at":"2018-08-06T06:02:50Z","updated_at":"2018-08-17T08:26:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f3fadacf191e00cac31ff37004c1f0e4decd7816","assignee":null,"assignees":[],"requested_reviewers":[{"login":"kneeraj","id":1151021,"node_id":"MDQ6VXNlcjExNTEwMjE=","avatar_url":"https://avatars3.githubusercontent.com/u/1151021?v=4","gravatar_id":"","url":"https://api.github.com/users/kneeraj","html_url":"https://github.com/kneeraj","followers_url":"https://api.github.com/users/kneeraj/followers","following_url":"https://api.github.com/users/kneeraj/following{/other_user}","gists_url":"https://api.github.com/users/kneeraj/gists{/gist_id}","starred_url":"https://api.github.com/users/kneeraj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kneeraj/subscriptions","organizations_url":"https://api.github.com/users/kneeraj/orgs","repos_url":"https://api.github.com/users/kneeraj/repos","events_url":"https://api.github.com/users/kneeraj/events{/privacy}","received_events_url":"https://api.github.com/users/kneeraj/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/SnappyDataInc/snappydata/pulls/1119/commits","review_comments_url":"https://api.github.com/repos/SnappyDataInc/snappydata/pulls/1119/comments","review_comment_url":"https://api.github.com/repos/SnappyDataInc/snappydata/pulls/comments{/number}","comments_url":"https://api.github.com/repos/SnappyDataInc/snappydata/issues/1119/comments","statuses_url":"https://api.github.com/repos/SnappyDataInc/snappydata/statuses/83528728c145468d5a6af9c47f6a4433fc3c316b","head":{"label":"SnappyDataInc:SNAP-2457","ref":"SNAP-2457","sha":"83528728c145468d5a6af9c47f6a4433fc3c316b","user":{"login":"SnappyDataInc","id":11342682,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExMzQyNjgy","avatar_url":"https://avatars2.githubusercontent.com/u/11342682?v=4","gravatar_id":"","url":"https://api.github.com/users/SnappyDataInc","html_url":"https://github.com/SnappyDataInc","followers_url":"https://api.github.com/users/SnappyDataInc/followers","following_url":"https://api.github.com/users/SnappyDataInc/following{/other_user}","gists_url":"https://api.github.com/users/SnappyDataInc/gists{/gist_id}","starred_url":"https://api.github.com/users/SnappyDataInc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SnappyDataInc/subscriptions","organizations_url":"https://api.github.com/users/SnappyDataInc/orgs","repos_url":"https://api.github.com/users/SnappyDataInc/repos","events_url":"https://api.github.com/users/SnappyDataInc/events{/privacy}","received_events_url":"https://api.github.com/users/SnappyDataInc/received_events","type":"Organization","site_admin":false},"repo":{"id":42580991,"node_id":"MDEwOlJlcG9zaXRvcnk0MjU4MDk5MQ==","name":"snappydata","full_name":"SnappyDataInc/snappydata","owner":{"login":"SnappyDataInc","id":11342682,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExMzQyNjgy","avatar_url":"https://avatars2.githubusercontent.com/u/11342682?v=4","gravatar_id":"","url":"https://api.github.com/users/SnappyDataInc","html_url":"https://github.com/SnappyDataInc","followers_url":"https://api.github.com/users/SnappyDataInc/followers","following_url":"https://api.github.com/users/SnappyDataInc/following{/other_user}","gists_url":"https://api.github.com/users/SnappyDataInc/gists{/gist_id}","starred_url":"https://api.github.com/users/SnappyDataInc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SnappyDataInc/subscriptions","organizations_url":"https://api.github.com/users/SnappyDataInc/orgs","repos_url":"https://api.github.com/users/SnappyDataInc/repos","events_url":"https://api.github.com/users/SnappyDataInc/events{/privacy}","received_events_url":"https://api.github.com/users/SnappyDataInc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/SnappyDataInc/snappydata","description":"SnappyData - The Spark Database. Stream, Transact, Analyze, Predict in one cluster ","fork":false,"url":"https://api.github.com/repos/SnappyDataInc/snappydata","forks_url":"https://api.github.com/repos/SnappyDataInc/snappydata/forks","keys_url":"https://api.github.com/repos/SnappyDataInc/snappydata/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SnappyDataInc/snappydata/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SnappyDataInc/snappydata/teams","hooks_url":"https://api.github.com/repos/SnappyDataInc/snappydata/hooks","issue_events_url":"https://api.github.com/repos/SnappyDataInc/snappydata/issues/events{/number}","events_url":"https://api.github.com/repos/SnappyDataInc/snappydata/events","assignees_url":"https://api.github.com/repos/SnappyDataInc/snappydata/assignees{/user}","branches_url":"https://api.github.com/repos/SnappyDataInc/snappydata/branches{/branch}","tags_url":"https://api.github.com/repos/SnappyDataInc/snappydata/tags","blobs_url":"https://api.github.com/repos/SnappyDataInc/snappydata/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SnappyDataInc/snappydata/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SnappyDataInc/snappydata/git/refs{/sha}","trees_url":"https://api.github.com/repos/SnappyDataInc/snappydata/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SnappyDataInc/snappydata/statuses/{sha}","languages_url":"https://api.github.com/repos/SnappyDataInc/snappydata/languages","stargazers_url":"https://api.github.com/repos/SnappyDataInc/snappydata/stargazers","contributors_url":"https://api.github.com/repos/SnappyDataInc/snappydata/contributors","subscribers_url":"https://api.github.com/repos/SnappyDataInc/snappydata/subscribers","subscription_url":"https://api.github.com/repos/SnappyDataInc/snappydata/subscription","commits_url":"https://api.github.com/repos/SnappyDataInc/snappydata/commits{/sha}","git_commits_url":"https://api.github.com/repos/SnappyDataInc/snappydata/git/commits{/sha}","comments_url":"https://api.github.com/repos/SnappyDataInc/snappydata/comments{/number}","issue_comment_url":"https://api.github.com/repos/SnappyDataInc/snappydata/issues/comments{/number}","contents_url":"https://api.github.com/repos/SnappyDataInc/snappydata/contents/{+path}","compare_url":"https://api.github.com/repos/SnappyDataInc/snappydata/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SnappyDataInc/snappydata/merges","archive_url":"https://api.github.com/repos/SnappyDataInc/snappydata/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SnappyDataInc/snappydata/downloads","issues_url":"https://api.github.com/repos/SnappyDataInc/snappydata/issues{/number}","pulls_url":"https://api.github.com/repos/SnappyDataInc/snappydata/pulls{/number}","milestones_url":"https://api.github.com/repos/SnappyDataInc/snappydata/milestones{/number}","notifications_url":"https://api.github.com/repos/SnappyDataInc/snappydata/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SnappyDataInc/snappydata/labels{/name}","releases_url":"https://api.github.com/repos/SnappyDataInc/snappydata/releases{/id}","deployments_url":"https://api.github.com/repos/SnappyDataInc/snappydata/deployments","created_at":"2015-09-16T10:36:36Z","updated_at":"2018-08-17T07:11:08Z","pushed_at":"2018-08-17T07:25:26Z","git_url":"git://github.com/SnappyDataInc/snappydata.git","ssh_url":"git@github.com:SnappyDataInc/snappydata.git","clone_url":"https://github.com/SnappyDataInc/snappydata.git","svn_url":"https://github.com/SnappyDataInc/snappydata","homepage":"http://www.snappydata.io","size":399889,"stargazers_count":764,"watchers_count":764,"language":"Scala","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":141,"mirror_url":null,"archived":false,"open_issues_count":84,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":141,"open_issues":84,"watchers":764,"default_branch":"master"}},"base":{"label":"SnappyDataInc:master","ref":"master","sha":"e342a112423bfb5cd5791d14da0f32df3a01c444","user":{"login":"SnappyDataInc","id":11342682,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExMzQyNjgy","avatar_url":"https://avatars2.githubusercontent.com/u/11342682?v=4","gravatar_id":"","url":"https://api.github.com/users/SnappyDataInc","html_url":"https://github.com/SnappyDataInc","followers_url":"https://api.github.com/users/SnappyDataInc/followers","following_url":"https://api.github.com/users/SnappyDataInc/following{/other_user}","gists_url":"https://api.github.com/users/SnappyDataInc/gists{/gist_id}","starred_url":"https://api.github.com/users/SnappyDataInc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SnappyDataInc/subscriptions","organizations_url":"https://api.github.com/users/SnappyDataInc/orgs","repos_url":"https://api.github.com/users/SnappyDataInc/repos","events_url":"https://api.github.com/users/SnappyDataInc/events{/privacy}","received_events_url":"https://api.github.com/users/SnappyDataInc/received_events","type":"Organization","site_admin":false},"repo":{"id":42580991,"node_id":"MDEwOlJlcG9zaXRvcnk0MjU4MDk5MQ==","name":"snappydata","full_name":"SnappyDataInc/snappydata","owner":{"login":"SnappyDataInc","id":11342682,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExMzQyNjgy","avatar_url":"https://avatars2.githubusercontent.com/u/11342682?v=4","gravatar_id":"","url":"https://api.github.com/users/SnappyDataInc","html_url":"https://github.com/SnappyDataInc","followers_url":"https://api.github.com/users/SnappyDataInc/followers","following_url":"https://api.github.com/users/SnappyDataInc/following{/other_user}","gists_url":"https://api.github.com/users/SnappyDataInc/gists{/gist_id}","starred_url":"https://api.github.com/users/SnappyDataInc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SnappyDataInc/subscriptions","organizations_url":"https://api.github.com/users/SnappyDataInc/orgs","repos_url":"https://api.github.com/users/SnappyDataInc/repos","events_url":"https://api.github.com/users/SnappyDataInc/events{/privacy}","received_events_url":"https://api.github.com/users/SnappyDataInc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/SnappyDataInc/snappydata","description":"SnappyData - The Spark Database. Stream, Transact, Analyze, Predict in one cluster ","fork":false,"url":"https://api.github.com/repos/SnappyDataInc/snappydata","forks_url":"https://api.github.com/repos/SnappyDataInc/snappydata/forks","keys_url":"https://api.github.com/repos/SnappyDataInc/snappydata/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SnappyDataInc/snappydata/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SnappyDataInc/snappydata/teams","hooks_url":"https://api.github.com/repos/SnappyDataInc/snappydata/hooks","issue_events_url":"https://api.github.com/repos/SnappyDataInc/snappydata/issues/events{/number}","events_url":"https://api.github.com/repos/SnappyDataInc/snappydata/events","assignees_url":"https://api.github.com/repos/SnappyDataInc/snappydata/assignees{/user}","branches_url":"https://api.github.com/repos/SnappyDataInc/snappydata/branches{/branch}","tags_url":"https://api.github.com/repos/SnappyDataInc/snappydata/tags","blobs_url":"https://api.github.com/repos/SnappyDataInc/snappydata/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SnappyDataInc/snappydata/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SnappyDataInc/snappydata/git/refs{/sha}","trees_url":"https://api.github.com/repos/SnappyDataInc/snappydata/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SnappyDataInc/snappydata/statuses/{sha}","languages_url":"https://api.github.com/repos/SnappyDataInc/snappydata/languages","stargazers_url":"https://api.github.com/repos/SnappyDataInc/snappydata/stargazers","contributors_url":"https://api.github.com/repos/SnappyDataInc/snappydata/contributors","subscribers_url":"https://api.github.com/repos/SnappyDataInc/snappydata/subscribers","subscription_url":"https://api.github.com/repos/SnappyDataInc/snappydata/subscription","commits_url":"https://api.github.com/repos/SnappyDataInc/snappydata/commits{/sha}","git_commits_url":"https://api.github.com/repos/SnappyDataInc/snappydata/git/commits{/sha}","comments_url":"https://api.github.com/repos/SnappyDataInc/snappydata/comments{/number}","issue_comment_url":"https://api.github.com/repos/SnappyDataInc/snappydata/issues/comments{/number}","contents_url":"https://api.github.com/repos/SnappyDataInc/snappydata/contents/{+path}","compare_url":"https://api.github.com/repos/SnappyDataInc/snappydata/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SnappyDataInc/snappydata/merges","archive_url":"https://api.github.com/repos/SnappyDataInc/snappydata/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SnappyDataInc/snappydata/downloads","issues_url":"https://api.github.com/repos/SnappyDataInc/snappydata/issues{/number}","pulls_url":"https://api.github.com/repos/SnappyDataInc/snappydata/pulls{/number}","milestones_url":"https://api.github.com/repos/SnappyDataInc/snappydata/milestones{/number}","notifications_url":"https://api.github.com/repos/SnappyDataInc/snappydata/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SnappyDataInc/snappydata/labels{/name}","releases_url":"https://api.github.com/repos/SnappyDataInc/snappydata/releases{/id}","deployments_url":"https://api.github.com/repos/SnappyDataInc/snappydata/deployments","created_at":"2015-09-16T10:36:36Z","updated_at":"2018-08-17T07:11:08Z","pushed_at":"2018-08-17T07:25:26Z","git_url":"git://github.com/SnappyDataInc/snappydata.git","ssh_url":"git@github.com:SnappyDataInc/snappydata.git","clone_url":"https://github.com/SnappyDataInc/snappydata.git","svn_url":"https://github.com/SnappyDataInc/snappydata","homepage":"http://www.snappydata.io","size":399889,"stargazers_count":764,"watchers_count":764,"language":"Scala","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":141,"mirror_url":null,"archived":false,"open_issues_count":84,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":141,"open_issues":84,"watchers":764,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/SnappyDataInc/snappydata/pulls/1119"},"html":{"href":"https://github.com/SnappyDataInc/snappydata/pull/1119"},"issue":{"href":"https://api.github.com/repos/SnappyDataInc/snappydata/issues/1119"},"comments":{"href":"https://api.github.com/repos/SnappyDataInc/snappydata/issues/1119/comments"},"review_comments":{"href":"https://api.github.com/repos/SnappyDataInc/snappydata/pulls/1119/comments"},"review_comment":{"href":"https://api.github.com/repos/SnappyDataInc/snappydata/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/SnappyDataInc/snappydata/pulls/1119/commits"},"statuses":{"href":"https://api.github.com/repos/SnappyDataInc/snappydata/statuses/83528728c145468d5a6af9c47f6a4433fc3c316b"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"rishitesh"}}