{"action":"created","comment":{"url":"https://api.github.com/repos/confluentinc/ksql/pulls/comments/238798743","pull_request_review_id":181429919,"id":238798743,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzODc5ODc0Mw==","diff_hunk":"@@ -0,0 +1,63 @@\n+/*\n+ * Copyright 2018 Confluent Inc.\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+\n+package io.confluent.ksql.cli.console;\n+\n+/**\n+ * Strips single line comments of the end of a line.\n+ *\n+ * <p>i.e. anything following an unquoted {@code --}.\n+ */\n+final class CommentStripper {\n+\n+  private CommentStripper() {\n+  }\n+\n+  static String strip(final String line) {\n+\n+    char lastChar = 'x';","path":"ksql-cli/src/main/java/io/confluent/ksql/cli/console/CommentStripper.java","position":null,"original_position":31,"commit_id":"e21349d092938c457c25353cfc0ac543656a15c6","original_commit_id":"822631e10a5cf9f5c7b3043565b9b9f3793fcec0","user":{"login":"big-andy-coates","id":8012398,"node_id":"MDQ6VXNlcjgwMTIzOTg=","avatar_url":"https://avatars0.githubusercontent.com/u/8012398?v=4","gravatar_id":"","url":"https://api.github.com/users/big-andy-coates","html_url":"https://github.com/big-andy-coates","followers_url":"https://api.github.com/users/big-andy-coates/followers","following_url":"https://api.github.com/users/big-andy-coates/following{/other_user}","gists_url":"https://api.github.com/users/big-andy-coates/gists{/gist_id}","starred_url":"https://api.github.com/users/big-andy-coates/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/big-andy-coates/subscriptions","organizations_url":"https://api.github.com/users/big-andy-coates/orgs","repos_url":"https://api.github.com/users/big-andy-coates/repos","events_url":"https://api.github.com/users/big-andy-coates/events{/privacy}","received_events_url":"https://api.github.com/users/big-andy-coates/received_events","type":"User","site_admin":false},"body":"Good call.","created_at":"2018-12-04T19:10:30Z","updated_at":"2018-12-04T19:10:31Z","html_url":"https://github.com/confluentinc/ksql/pull/2214#discussion_r238798743","pull_request_url":"https://api.github.com/repos/confluentinc/ksql/pulls/2214","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/confluentinc/ksql/pulls/comments/238798743"},"html":{"href":"https://github.com/confluentinc/ksql/pull/2214#discussion_r238798743"},"pull_request":{"href":"https://api.github.com/repos/confluentinc/ksql/pulls/2214"}},"in_reply_to_id":238195331},"pull_request":{"url":"https://api.github.com/repos/confluentinc/ksql/pulls/2214","id":234641503,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM0NjQxNTAz","html_url":"https://github.com/confluentinc/ksql/pull/2214","diff_url":"https://github.com/confluentinc/ksql/pull/2214.diff","patch_url":"https://github.com/confluentinc/ksql/pull/2214.patch","issue_url":"https://api.github.com/repos/confluentinc/ksql/issues/2214","number":2214,"state":"open","locked":false,"title":"Fix some CLI line termination issues","user":{"login":"big-andy-coates","id":8012398,"node_id":"MDQ6VXNlcjgwMTIzOTg=","avatar_url":"https://avatars0.githubusercontent.com/u/8012398?v=4","gravatar_id":"","url":"https://api.github.com/users/big-andy-coates","html_url":"https://github.com/big-andy-coates","followers_url":"https://api.github.com/users/big-andy-coates/followers","following_url":"https://api.github.com/users/big-andy-coates/following{/other_user}","gists_url":"https://api.github.com/users/big-andy-coates/gists{/gist_id}","starred_url":"https://api.github.com/users/big-andy-coates/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/big-andy-coates/subscriptions","organizations_url":"https://api.github.com/users/big-andy-coates/orgs","repos_url":"https://api.github.com/users/big-andy-coates/repos","events_url":"https://api.github.com/users/big-andy-coates/events{/privacy}","received_events_url":"https://api.github.com/users/big-andy-coates/received_events","type":"User","site_admin":false},"body":"### Description \r\nThis is a follow up PR to the recently merged CLI line termination logic, which saw the CLI no longer need the line continuation character '\\' to handle multi-line statements.\r\n\r\nThis PR sees two changes:\r\n- A fix to allow the CLI to handle single line comments, e.g. \r\n\r\n```sql\r\n-- this is a comment\r\nSELECT * FROM FOO; -- this is also a comment\r\n```\r\n\r\n- Feedback from @rmoff, @miguno and @hjafarpour was to switch to replacing a line break with a space:\r\n\r\nOld functionality would not inject space, so it was possible to split identifiers over lines:\r\n\r\n```\r\nksql> select * from some\r\n> _table;\r\n```\r\n\r\nBut this didn't allow splitting commands over multiple lines without explicitly adding spaces at the end or start of lines. e.g. this would not work as it would be treated as `select*fromsomething;`\r\n\r\n```\r\nksql> select\r\n> *\r\n> from\r\n> something;\r\n```\r\n\r\nNew functionality adds an implicit space for any new lines, so the above does work as expected.\r\n\r\n### Testing done \r\nTests added + manual\r\n\r\n### Reviewer checklist\r\n- [ ] Ensure docs are updated if necessary. (eg. if a user visible feature is being added or changed).\r\n- [ ] Ensure relevant issues are linked (description should include text like \"Fixes #<issue number>\")\r\n\r\n","created_at":"2018-11-29T13:40:42Z","updated_at":"2018-12-04T19:10:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"902863fbd1558231b623716fc907f52d04ff73fd","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/confluentinc/ksql/pulls/2214/commits","review_comments_url":"https://api.github.com/repos/confluentinc/ksql/pulls/2214/comments","review_comment_url":"https://api.github.com/repos/confluentinc/ksql/pulls/comments{/number}","comments_url":"https://api.github.com/repos/confluentinc/ksql/issues/2214/comments","statuses_url":"https://api.github.com/repos/confluentinc/ksql/statuses/e21349d092938c457c25353cfc0ac543656a15c6","head":{"label":"big-andy-coates:line_termination","ref":"line_termination","sha":"e21349d092938c457c25353cfc0ac543656a15c6","user":{"login":"big-andy-coates","id":8012398,"node_id":"MDQ6VXNlcjgwMTIzOTg=","avatar_url":"https://avatars0.githubusercontent.com/u/8012398?v=4","gravatar_id":"","url":"https://api.github.com/users/big-andy-coates","html_url":"https://github.com/big-andy-coates","followers_url":"https://api.github.com/users/big-andy-coates/followers","following_url":"https://api.github.com/users/big-andy-coates/following{/other_user}","gists_url":"https://api.github.com/users/big-andy-coates/gists{/gist_id}","starred_url":"https://api.github.com/users/big-andy-coates/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/big-andy-coates/subscriptions","organizations_url":"https://api.github.com/users/big-andy-coates/orgs","repos_url":"https://api.github.com/users/big-andy-coates/repos","events_url":"https://api.github.com/users/big-andy-coates/events{/privacy}","received_events_url":"https://api.github.com/users/big-andy-coates/received_events","type":"User","site_admin":false},"repo":{"id":122631155,"node_id":"MDEwOlJlcG9zaXRvcnkxMjI2MzExNTU=","name":"ksql","full_name":"big-andy-coates/ksql","private":false,"owner":{"login":"big-andy-coates","id":8012398,"node_id":"MDQ6VXNlcjgwMTIzOTg=","avatar_url":"https://avatars0.githubusercontent.com/u/8012398?v=4","gravatar_id":"","url":"https://api.github.com/users/big-andy-coates","html_url":"https://github.com/big-andy-coates","followers_url":"https://api.github.com/users/big-andy-coates/followers","following_url":"https://api.github.com/users/big-andy-coates/following{/other_user}","gists_url":"https://api.github.com/users/big-andy-coates/gists{/gist_id}","starred_url":"https://api.github.com/users/big-andy-coates/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/big-andy-coates/subscriptions","organizations_url":"https://api.github.com/users/big-andy-coates/orgs","repos_url":"https://api.github.com/users/big-andy-coates/repos","events_url":"https://api.github.com/users/big-andy-coates/events{/privacy}","received_events_url":"https://api.github.com/users/big-andy-coates/received_events","type":"User","site_admin":false},"html_url":"https://github.com/big-andy-coates/ksql","description":"KSQL - the Streaming SQL Engine for Apache Kafka ","fork":true,"url":"https://api.github.com/repos/big-andy-coates/ksql","forks_url":"https://api.github.com/repos/big-andy-coates/ksql/forks","keys_url":"https://api.github.com/repos/big-andy-coates/ksql/keys{/key_id}","collaborators_url":"https://api.github.com/repos/big-andy-coates/ksql/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/big-andy-coates/ksql/teams","hooks_url":"https://api.github.com/repos/big-andy-coates/ksql/hooks","issue_events_url":"https://api.github.com/repos/big-andy-coates/ksql/issues/events{/number}","events_url":"https://api.github.com/repos/big-andy-coates/ksql/events","assignees_url":"https://api.github.com/repos/big-andy-coates/ksql/assignees{/user}","branches_url":"https://api.github.com/repos/big-andy-coates/ksql/branches{/branch}","tags_url":"https://api.github.com/repos/big-andy-coates/ksql/tags","blobs_url":"https://api.github.com/repos/big-andy-coates/ksql/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/big-andy-coates/ksql/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/big-andy-coates/ksql/git/refs{/sha}","trees_url":"https://api.github.com/repos/big-andy-coates/ksql/git/trees{/sha}","statuses_url":"https://api.github.com/repos/big-andy-coates/ksql/statuses/{sha}","languages_url":"https://api.github.com/repos/big-andy-coates/ksql/languages","stargazers_url":"https://api.github.com/repos/big-andy-coates/ksql/stargazers","contributors_url":"https://api.github.com/repos/big-andy-coates/ksql/contributors","subscribers_url":"https://api.github.com/repos/big-andy-coates/ksql/subscribers","subscription_url":"https://api.github.com/repos/big-andy-coates/ksql/subscription","commits_url":"https://api.github.com/repos/big-andy-coates/ksql/commits{/sha}","git_commits_url":"https://api.github.com/repos/big-andy-coates/ksql/git/commits{/sha}","comments_url":"https://api.github.com/repos/big-andy-coates/ksql/comments{/number}","issue_comment_url":"https://api.github.com/repos/big-andy-coates/ksql/issues/comments{/number}","contents_url":"https://api.github.com/repos/big-andy-coates/ksql/contents/{+path}","compare_url":"https://api.github.com/repos/big-andy-coates/ksql/compare/{base}...{head}","merges_url":"https://api.github.com/repos/big-andy-coates/ksql/merges","archive_url":"https://api.github.com/repos/big-andy-coates/ksql/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/big-andy-coates/ksql/downloads","issues_url":"https://api.github.com/repos/big-andy-coates/ksql/issues{/number}","pulls_url":"https://api.github.com/repos/big-andy-coates/ksql/pulls{/number}","milestones_url":"https://api.github.com/repos/big-andy-coates/ksql/milestones{/number}","notifications_url":"https://api.github.com/repos/big-andy-coates/ksql/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/big-andy-coates/ksql/labels{/name}","releases_url":"https://api.github.com/repos/big-andy-coates/ksql/releases{/id}","deployments_url":"https://api.github.com/repos/big-andy-coates/ksql/deployments","created_at":"2018-02-23T14:24:40Z","updated_at":"2018-02-23T14:24:43Z","pushed_at":"2018-12-04T19:10:20Z","git_url":"git://github.com/big-andy-coates/ksql.git","ssh_url":"git@github.com:big-andy-coates/ksql.git","clone_url":"https://github.com/big-andy-coates/ksql.git","svn_url":"https://github.com/big-andy-coates/ksql","homepage":"","size":13103,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"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":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"confluentinc:master","ref":"master","sha":"ca58bf0d86b4de4298ee7a49d0420bd8523b5598","user":{"login":"confluentinc","id":9439498,"node_id":"MDEyOk9yZ2FuaXphdGlvbjk0Mzk0OTg=","avatar_url":"https://avatars0.githubusercontent.com/u/9439498?v=4","gravatar_id":"","url":"https://api.github.com/users/confluentinc","html_url":"https://github.com/confluentinc","followers_url":"https://api.github.com/users/confluentinc/followers","following_url":"https://api.github.com/users/confluentinc/following{/other_user}","gists_url":"https://api.github.com/users/confluentinc/gists{/gist_id}","starred_url":"https://api.github.com/users/confluentinc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/confluentinc/subscriptions","organizations_url":"https://api.github.com/users/confluentinc/orgs","repos_url":"https://api.github.com/users/confluentinc/repos","events_url":"https://api.github.com/users/confluentinc/events{/privacy}","received_events_url":"https://api.github.com/users/confluentinc/received_events","type":"Organization","site_admin":false},"repo":{"id":69400326,"node_id":"MDEwOlJlcG9zaXRvcnk2OTQwMDMyNg==","name":"ksql","full_name":"confluentinc/ksql","private":false,"owner":{"login":"confluentinc","id":9439498,"node_id":"MDEyOk9yZ2FuaXphdGlvbjk0Mzk0OTg=","avatar_url":"https://avatars0.githubusercontent.com/u/9439498?v=4","gravatar_id":"","url":"https://api.github.com/users/confluentinc","html_url":"https://github.com/confluentinc","followers_url":"https://api.github.com/users/confluentinc/followers","following_url":"https://api.github.com/users/confluentinc/following{/other_user}","gists_url":"https://api.github.com/users/confluentinc/gists{/gist_id}","starred_url":"https://api.github.com/users/confluentinc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/confluentinc/subscriptions","organizations_url":"https://api.github.com/users/confluentinc/orgs","repos_url":"https://api.github.com/users/confluentinc/repos","events_url":"https://api.github.com/users/confluentinc/events{/privacy}","received_events_url":"https://api.github.com/users/confluentinc/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/confluentinc/ksql","description":"KSQL - the Streaming SQL Engine for Apache Kafka ","fork":false,"url":"https://api.github.com/repos/confluentinc/ksql","forks_url":"https://api.github.com/repos/confluentinc/ksql/forks","keys_url":"https://api.github.com/repos/confluentinc/ksql/keys{/key_id}","collaborators_url":"https://api.github.com/repos/confluentinc/ksql/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/confluentinc/ksql/teams","hooks_url":"https://api.github.com/repos/confluentinc/ksql/hooks","issue_events_url":"https://api.github.com/repos/confluentinc/ksql/issues/events{/number}","events_url":"https://api.github.com/repos/confluentinc/ksql/events","assignees_url":"https://api.github.com/repos/confluentinc/ksql/assignees{/user}","branches_url":"https://api.github.com/repos/confluentinc/ksql/branches{/branch}","tags_url":"https://api.github.com/repos/confluentinc/ksql/tags","blobs_url":"https://api.github.com/repos/confluentinc/ksql/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/confluentinc/ksql/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/confluentinc/ksql/git/refs{/sha}","trees_url":"https://api.github.com/repos/confluentinc/ksql/git/trees{/sha}","statuses_url":"https://api.github.com/repos/confluentinc/ksql/statuses/{sha}","languages_url":"https://api.github.com/repos/confluentinc/ksql/languages","stargazers_url":"https://api.github.com/repos/confluentinc/ksql/stargazers","contributors_url":"https://api.github.com/repos/confluentinc/ksql/contributors","subscribers_url":"https://api.github.com/repos/confluentinc/ksql/subscribers","subscription_url":"https://api.github.com/repos/confluentinc/ksql/subscription","commits_url":"https://api.github.com/repos/confluentinc/ksql/commits{/sha}","git_commits_url":"https://api.github.com/repos/confluentinc/ksql/git/commits{/sha}","comments_url":"https://api.github.com/repos/confluentinc/ksql/comments{/number}","issue_comment_url":"https://api.github.com/repos/confluentinc/ksql/issues/comments{/number}","contents_url":"https://api.github.com/repos/confluentinc/ksql/contents/{+path}","compare_url":"https://api.github.com/repos/confluentinc/ksql/compare/{base}...{head}","merges_url":"https://api.github.com/repos/confluentinc/ksql/merges","archive_url":"https://api.github.com/repos/confluentinc/ksql/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/confluentinc/ksql/downloads","issues_url":"https://api.github.com/repos/confluentinc/ksql/issues{/number}","pulls_url":"https://api.github.com/repos/confluentinc/ksql/pulls{/number}","milestones_url":"https://api.github.com/repos/confluentinc/ksql/milestones{/number}","notifications_url":"https://api.github.com/repos/confluentinc/ksql/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/confluentinc/ksql/labels{/name}","releases_url":"https://api.github.com/repos/confluentinc/ksql/releases{/id}","deployments_url":"https://api.github.com/repos/confluentinc/ksql/deployments","created_at":"2016-09-27T21:30:15Z","updated_at":"2018-12-04T19:05:00Z","pushed_at":"2018-12-04T19:10:22Z","git_url":"git://github.com/confluentinc/ksql.git","ssh_url":"git@github.com:confluentinc/ksql.git","clone_url":"https://github.com/confluentinc/ksql.git","svn_url":"https://github.com/confluentinc/ksql","homepage":"","size":13719,"stargazers_count":2044,"watchers_count":2044,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":385,"mirror_url":null,"archived":false,"open_issues_count":423,"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":385,"open_issues":423,"watchers":2044,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/confluentinc/ksql/pulls/2214"},"html":{"href":"https://github.com/confluentinc/ksql/pull/2214"},"issue":{"href":"https://api.github.com/repos/confluentinc/ksql/issues/2214"},"comments":{"href":"https://api.github.com/repos/confluentinc/ksql/issues/2214/comments"},"review_comments":{"href":"https://api.github.com/repos/confluentinc/ksql/pulls/2214/comments"},"review_comment":{"href":"https://api.github.com/repos/confluentinc/ksql/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/confluentinc/ksql/pulls/2214/commits"},"statuses":{"href":"https://api.github.com/repos/confluentinc/ksql/statuses/e21349d092938c457c25353cfc0ac543656a15c6"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"big-andy-coates"}}