{"action":"created","comment":{"url":"https://api.github.com/repos/opencypher/openCypher/pulls/comments/67857243","id":67857243,"diff_hunk":"@@ -0,0 +1,233 @@\n+= CIP2016-06-14 - Harmonize Comparability, Orderability, Equality, and Equivalence\n+:numbered:\n+:toc:\n+:toc-placement: macro\n+:source-highlighter: codemirror\n+\n+*Author:* Mats Rydberg <mats@neotechnology.com>, Stefan Plantikow <stefan.plantikow@neotechnology.com>\n+\n+[abstract]\n+.Abstract\n+--\n+This CIP intends to introduce and formalise two new concepts, *comparability* and *orderability*, and defines their relationship to the already existing concepts of *equality* and *equivalence*.\n+Comparability revolves around the inequality operators (`>`, `<`, `>=`, `<=`), and defines the semantics they need to properly determine how two values compare to each other.\n+Orderability revolves around the `ORDER BY` clause, and defines the semantics it needs to be able to properly sort values passed to it.\n+Futhermore, the definitions of *equality* and *equivalence* are harmonized and spelled out.\n+In summary, we are proposing some changes to how Cypher defines these four concepts in order to get a consistent set of rules and a simpler conceptual model.\n+--\n+\n+toc::[]\n+\n+\n+== Motivation\n+\n+There are currently a number of limitations and inconsistencies that this CIP aims to fix.\n+\n+(1) Cypher already has good semantics for equality within the primitive types (booleans, strings, integers, and floats) and maps.\n+Furthermore, Cypher has good semantics for comparability and orderability for integers, floats, and strings, within the types.\n+However working with values of different types can be difficult:\n+\n+  * Comparability between values of different types is often undefined, which is something we regard as a problem for certain combinations of values and types.\n+  * `ORDER BY` will often fail with an error if the values passed to it have different types.\n+\n+(2) The underlying conceptual model is complex and sometimes inconsistent which leads to an unclear relationship between comparison operators, equality, grouping, and `ORDER BY`:\n+\n+  * Comparability and orderability are not aligned with each other consistently (Some types may be ordered but not compared).\n+  * There are various inconsistencies around equality (and equivalence) semantics as exposed by `IN`, `=`, `DISTINCT`, and grouping.\n+  The difference between equality and equivalence in Cypher today is small and subtle, and limited to testing two instances of the value `null` to each other.\n+\n+    ** In equality, `null = null` is `null`.\n+    ** In equivalence, used by grouping and `DISTINCT`, instances of `null` are always treated as being the same value.\n+    ** However, equality treats `null` values differently if they are an element of a list or a map value.\n+    ** Similar rules apply for `NaN`.\n+\n+== Proposal\n+\n+=== Comparability\n+\n+We propose that comparability be defined between any pair of values, as specified below (Please note that `null` is interpreted as meaning \"unknown\" or \"could be any value\" in the context of comparability):","path":"cip/CIP2016-06-14-Harmonize-comparability-orderability-equality-and-equivalence.adoc","position":48,"original_position":48,"commit_id":"c56874d2328a13bfc9b76c05ca25ba8f376e75b8","original_commit_id":"c56874d2328a13bfc9b76c05ca25ba8f376e75b8","user":{"login":"petraselmer","id":9249759,"avatar_url":"https://avatars.githubusercontent.com/u/9249759?v=3","gravatar_id":"","url":"https://api.github.com/users/petraselmer","html_url":"https://github.com/petraselmer","followers_url":"https://api.github.com/users/petraselmer/followers","following_url":"https://api.github.com/users/petraselmer/following{/other_user}","gists_url":"https://api.github.com/users/petraselmer/gists{/gist_id}","starred_url":"https://api.github.com/users/petraselmer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petraselmer/subscriptions","organizations_url":"https://api.github.com/users/petraselmer/orgs","repos_url":"https://api.github.com/users/petraselmer/repos","events_url":"https://api.github.com/users/petraselmer/events{/privacy}","received_events_url":"https://api.github.com/users/petraselmer/received_events","type":"User","site_admin":false},"body":"\"Please\" --> \"please\"","created_at":"2016-06-21T12:20:35Z","updated_at":"2016-06-21T12:20:35Z","html_url":"https://github.com/opencypher/openCypher/pull/97#discussion_r67857243","pull_request_url":"https://api.github.com/repos/opencypher/openCypher/pulls/97","_links":{"self":{"href":"https://api.github.com/repos/opencypher/openCypher/pulls/comments/67857243"},"html":{"href":"https://github.com/opencypher/openCypher/pull/97#discussion_r67857243"},"pull_request":{"href":"https://api.github.com/repos/opencypher/openCypher/pulls/97"}}},"pull_request":{"url":"https://api.github.com/repos/opencypher/openCypher/pulls/97","id":74491419,"html_url":"https://github.com/opencypher/openCypher/pull/97","diff_url":"https://github.com/opencypher/openCypher/pull/97.diff","patch_url":"https://github.com/opencypher/openCypher/pull/97.patch","issue_url":"https://api.github.com/repos/opencypher/openCypher/issues/97","number":97,"state":"open","locked":false,"title":"Harmonize comparability, orderability, equality, and equivalence","user":{"login":"boggle","id":50886,"avatar_url":"https://avatars.githubusercontent.com/u/50886?v=3","gravatar_id":"","url":"https://api.github.com/users/boggle","html_url":"https://github.com/boggle","followers_url":"https://api.github.com/users/boggle/followers","following_url":"https://api.github.com/users/boggle/following{/other_user}","gists_url":"https://api.github.com/users/boggle/gists{/gist_id}","starred_url":"https://api.github.com/users/boggle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/boggle/subscriptions","organizations_url":"https://api.github.com/users/boggle/orgs","repos_url":"https://api.github.com/users/boggle/repos","events_url":"https://api.github.com/users/boggle/events{/privacy}","received_events_url":"https://api.github.com/users/boggle/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-06-20T18:37:24Z","updated_at":"2016-06-21T12:20:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"345f1236ff502f39fb6d4a406c2084c52196096c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/opencypher/openCypher/pulls/97/commits","review_comments_url":"https://api.github.com/repos/opencypher/openCypher/pulls/97/comments","review_comment_url":"https://api.github.com/repos/opencypher/openCypher/pulls/comments{/number}","comments_url":"https://api.github.com/repos/opencypher/openCypher/issues/97/comments","statuses_url":"https://api.github.com/repos/opencypher/openCypher/statuses/c56874d2328a13bfc9b76c05ca25ba8f376e75b8","head":{"label":"Mats-SX:comparability-cip","ref":"comparability-cip","sha":"c56874d2328a13bfc9b76c05ca25ba8f376e75b8","user":{"login":"Mats-SX","id":2419675,"avatar_url":"https://avatars.githubusercontent.com/u/2419675?v=3","gravatar_id":"","url":"https://api.github.com/users/Mats-SX","html_url":"https://github.com/Mats-SX","followers_url":"https://api.github.com/users/Mats-SX/followers","following_url":"https://api.github.com/users/Mats-SX/following{/other_user}","gists_url":"https://api.github.com/users/Mats-SX/gists{/gist_id}","starred_url":"https://api.github.com/users/Mats-SX/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mats-SX/subscriptions","organizations_url":"https://api.github.com/users/Mats-SX/orgs","repos_url":"https://api.github.com/users/Mats-SX/repos","events_url":"https://api.github.com/users/Mats-SX/events{/privacy}","received_events_url":"https://api.github.com/users/Mats-SX/received_events","type":"User","site_admin":false},"repo":{"id":45028229,"name":"openCypher","full_name":"Mats-SX/openCypher","owner":{"login":"Mats-SX","id":2419675,"avatar_url":"https://avatars.githubusercontent.com/u/2419675?v=3","gravatar_id":"","url":"https://api.github.com/users/Mats-SX","html_url":"https://github.com/Mats-SX","followers_url":"https://api.github.com/users/Mats-SX/followers","following_url":"https://api.github.com/users/Mats-SX/following{/other_user}","gists_url":"https://api.github.com/users/Mats-SX/gists{/gist_id}","starred_url":"https://api.github.com/users/Mats-SX/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mats-SX/subscriptions","organizations_url":"https://api.github.com/users/Mats-SX/orgs","repos_url":"https://api.github.com/users/Mats-SX/repos","events_url":"https://api.github.com/users/Mats-SX/events{/privacy}","received_events_url":"https://api.github.com/users/Mats-SX/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Mats-SX/openCypher","description":"Specification of the Cypher query language","fork":true,"url":"https://api.github.com/repos/Mats-SX/openCypher","forks_url":"https://api.github.com/repos/Mats-SX/openCypher/forks","keys_url":"https://api.github.com/repos/Mats-SX/openCypher/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Mats-SX/openCypher/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Mats-SX/openCypher/teams","hooks_url":"https://api.github.com/repos/Mats-SX/openCypher/hooks","issue_events_url":"https://api.github.com/repos/Mats-SX/openCypher/issues/events{/number}","events_url":"https://api.github.com/repos/Mats-SX/openCypher/events","assignees_url":"https://api.github.com/repos/Mats-SX/openCypher/assignees{/user}","branches_url":"https://api.github.com/repos/Mats-SX/openCypher/branches{/branch}","tags_url":"https://api.github.com/repos/Mats-SX/openCypher/tags","blobs_url":"https://api.github.com/repos/Mats-SX/openCypher/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Mats-SX/openCypher/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Mats-SX/openCypher/git/refs{/sha}","trees_url":"https://api.github.com/repos/Mats-SX/openCypher/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Mats-SX/openCypher/statuses/{sha}","languages_url":"https://api.github.com/repos/Mats-SX/openCypher/languages","stargazers_url":"https://api.github.com/repos/Mats-SX/openCypher/stargazers","contributors_url":"https://api.github.com/repos/Mats-SX/openCypher/contributors","subscribers_url":"https://api.github.com/repos/Mats-SX/openCypher/subscribers","subscription_url":"https://api.github.com/repos/Mats-SX/openCypher/subscription","commits_url":"https://api.github.com/repos/Mats-SX/openCypher/commits{/sha}","git_commits_url":"https://api.github.com/repos/Mats-SX/openCypher/git/commits{/sha}","comments_url":"https://api.github.com/repos/Mats-SX/openCypher/comments{/number}","issue_comment_url":"https://api.github.com/repos/Mats-SX/openCypher/issues/comments{/number}","contents_url":"https://api.github.com/repos/Mats-SX/openCypher/contents/{+path}","compare_url":"https://api.github.com/repos/Mats-SX/openCypher/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Mats-SX/openCypher/merges","archive_url":"https://api.github.com/repos/Mats-SX/openCypher/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Mats-SX/openCypher/downloads","issues_url":"https://api.github.com/repos/Mats-SX/openCypher/issues{/number}","pulls_url":"https://api.github.com/repos/Mats-SX/openCypher/pulls{/number}","milestones_url":"https://api.github.com/repos/Mats-SX/openCypher/milestones{/number}","notifications_url":"https://api.github.com/repos/Mats-SX/openCypher/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Mats-SX/openCypher/labels{/name}","releases_url":"https://api.github.com/repos/Mats-SX/openCypher/releases{/id}","deployments_url":"https://api.github.com/repos/Mats-SX/openCypher/deployments","created_at":"2015-10-27T08:53:14Z","updated_at":"2016-02-10T12:26:32Z","pushed_at":"2016-06-21T11:17:00Z","git_url":"git://github.com/Mats-SX/openCypher.git","ssh_url":"git@github.com:Mats-SX/openCypher.git","clone_url":"https://github.com/Mats-SX/openCypher.git","svn_url":"https://github.com/Mats-SX/openCypher","homepage":null,"size":2239,"stargazers_count":0,"watchers_count":0,"language":"Cucumber","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"opencypher:master","ref":"master","sha":"630062273b04d0bcdd4cdaff507296fe5ddc458c","user":{"login":"opencypher","id":14857376,"avatar_url":"https://avatars.githubusercontent.com/u/14857376?v=3","gravatar_id":"","url":"https://api.github.com/users/opencypher","html_url":"https://github.com/opencypher","followers_url":"https://api.github.com/users/opencypher/followers","following_url":"https://api.github.com/users/opencypher/following{/other_user}","gists_url":"https://api.github.com/users/opencypher/gists{/gist_id}","starred_url":"https://api.github.com/users/opencypher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opencypher/subscriptions","organizations_url":"https://api.github.com/users/opencypher/orgs","repos_url":"https://api.github.com/users/opencypher/repos","events_url":"https://api.github.com/users/opencypher/events{/privacy}","received_events_url":"https://api.github.com/users/opencypher/received_events","type":"Organization","site_admin":false},"repo":{"id":30405191,"name":"openCypher","full_name":"opencypher/openCypher","owner":{"login":"opencypher","id":14857376,"avatar_url":"https://avatars.githubusercontent.com/u/14857376?v=3","gravatar_id":"","url":"https://api.github.com/users/opencypher","html_url":"https://github.com/opencypher","followers_url":"https://api.github.com/users/opencypher/followers","following_url":"https://api.github.com/users/opencypher/following{/other_user}","gists_url":"https://api.github.com/users/opencypher/gists{/gist_id}","starred_url":"https://api.github.com/users/opencypher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opencypher/subscriptions","organizations_url":"https://api.github.com/users/opencypher/orgs","repos_url":"https://api.github.com/users/opencypher/repos","events_url":"https://api.github.com/users/opencypher/events{/privacy}","received_events_url":"https://api.github.com/users/opencypher/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/opencypher/openCypher","description":"Specification of the Cypher query language","fork":false,"url":"https://api.github.com/repos/opencypher/openCypher","forks_url":"https://api.github.com/repos/opencypher/openCypher/forks","keys_url":"https://api.github.com/repos/opencypher/openCypher/keys{/key_id}","collaborators_url":"https://api.github.com/repos/opencypher/openCypher/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/opencypher/openCypher/teams","hooks_url":"https://api.github.com/repos/opencypher/openCypher/hooks","issue_events_url":"https://api.github.com/repos/opencypher/openCypher/issues/events{/number}","events_url":"https://api.github.com/repos/opencypher/openCypher/events","assignees_url":"https://api.github.com/repos/opencypher/openCypher/assignees{/user}","branches_url":"https://api.github.com/repos/opencypher/openCypher/branches{/branch}","tags_url":"https://api.github.com/repos/opencypher/openCypher/tags","blobs_url":"https://api.github.com/repos/opencypher/openCypher/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/opencypher/openCypher/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/opencypher/openCypher/git/refs{/sha}","trees_url":"https://api.github.com/repos/opencypher/openCypher/git/trees{/sha}","statuses_url":"https://api.github.com/repos/opencypher/openCypher/statuses/{sha}","languages_url":"https://api.github.com/repos/opencypher/openCypher/languages","stargazers_url":"https://api.github.com/repos/opencypher/openCypher/stargazers","contributors_url":"https://api.github.com/repos/opencypher/openCypher/contributors","subscribers_url":"https://api.github.com/repos/opencypher/openCypher/subscribers","subscription_url":"https://api.github.com/repos/opencypher/openCypher/subscription","commits_url":"https://api.github.com/repos/opencypher/openCypher/commits{/sha}","git_commits_url":"https://api.github.com/repos/opencypher/openCypher/git/commits{/sha}","comments_url":"https://api.github.com/repos/opencypher/openCypher/comments{/number}","issue_comment_url":"https://api.github.com/repos/opencypher/openCypher/issues/comments{/number}","contents_url":"https://api.github.com/repos/opencypher/openCypher/contents/{+path}","compare_url":"https://api.github.com/repos/opencypher/openCypher/compare/{base}...{head}","merges_url":"https://api.github.com/repos/opencypher/openCypher/merges","archive_url":"https://api.github.com/repos/opencypher/openCypher/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/opencypher/openCypher/downloads","issues_url":"https://api.github.com/repos/opencypher/openCypher/issues{/number}","pulls_url":"https://api.github.com/repos/opencypher/openCypher/pulls{/number}","milestones_url":"https://api.github.com/repos/opencypher/openCypher/milestones{/number}","notifications_url":"https://api.github.com/repos/opencypher/openCypher/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/opencypher/openCypher/labels{/name}","releases_url":"https://api.github.com/repos/opencypher/openCypher/releases{/id}","deployments_url":"https://api.github.com/repos/opencypher/openCypher/deployments","created_at":"2015-02-06T09:35:42Z","updated_at":"2016-06-20T17:59:06Z","pushed_at":"2016-06-21T11:17:00Z","git_url":"git://github.com/opencypher/openCypher.git","ssh_url":"git@github.com:opencypher/openCypher.git","clone_url":"https://github.com/opencypher/openCypher.git","svn_url":"https://github.com/opencypher/openCypher","homepage":"http://www.opencypher.org","size":2251,"stargazers_count":79,"watchers_count":79,"language":"Cucumber","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":17,"mirror_url":null,"open_issues_count":13,"forks":17,"open_issues":13,"watchers":79,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/opencypher/openCypher/pulls/97"},"html":{"href":"https://github.com/opencypher/openCypher/pull/97"},"issue":{"href":"https://api.github.com/repos/opencypher/openCypher/issues/97"},"comments":{"href":"https://api.github.com/repos/opencypher/openCypher/issues/97/comments"},"review_comments":{"href":"https://api.github.com/repos/opencypher/openCypher/pulls/97/comments"},"review_comment":{"href":"https://api.github.com/repos/opencypher/openCypher/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/opencypher/openCypher/pulls/97/commits"},"statuses":{"href":"https://api.github.com/repos/opencypher/openCypher/statuses/c56874d2328a13bfc9b76c05ca25ba8f376e75b8"}}}}
{"actor":{"display_login":"petraselmer"}}