{"action":"created","comment":{"url":"https://api.github.com/repos/yandex/ClickHouse/pulls/comments/205590297","pull_request_review_id":140893919,"id":205590297,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNTU5MDI5Nw==","diff_hunk":"@@ -0,0 +1,59 @@\n+<a name=\"data_type-nullable\"></a>\n+\n+# Nullable(TypeName)\n+\n+Позволяет хранить в таблице [NULL](../query_language/syntax.md#null-literal) вместо значения типа `TypeName`. Например, `Nullable(Int8)` позволяет хранить `NULL` вместо значений `Int8`.\n+\n+В качестве `TypeName` нельзя использовать составные типы данных [Array](array.md#data_type-array) и [Tuple](tuple.md#data_type-tuple). Составные типы данных могут содержать значения типа `Nullable`, например `Array(Nullable(Int8))`.\n+\n+Поле типа `Nullable` нельзя включать в индексы.\n+\n+`NULL` — значение по умолчанию для типа `Nullable`, если в конфигурации сервера ClickHouse не указано иное.\n+\n+##Особенности хранения\n+\n+Для хранения значения типа `Nullable` ClickHouse использует:\n+\n+- Отдельный файл с масками `NULL` (далее маска).\n+- Непосредственно файл со значениями.\n+\n+Маска определяет, что лежит в ячейке данных: `NULL` или значение.\n+\n+В случае, когда маска указывает, что в ячейке хранится `NULL`, в файле значений хранится значение по умолчанию для типа данных. Т.е. если, например, поле имеет тип `Nullable(Int8)`, то ячейка будет хранить значение по умолчанию для `Int8`. Эта особенность увеличивает размер хранилища. Также для некоторых операций возможно снижение производительности. Будьте внимательны при проектировании системы хранения.\n+\n+## Пример использования\n+\n+```\n+:) CREATE TABLE t_null(x Int8, y Nullable(Int8)) engine TinyLog\n+\n+CREATE TABLE t_null\n+(\n+    x Int8,\n+    y Nullable(Int8)\n+)\n+ENGINE = TinyLog\n+\n+Ok.\n+\n+0 rows in set. Elapsed: 0.012 sec.\n+\n+:) INSERT INTO t_null VALUES (1, NULL)\n+\n+INSERT INTO t_null VALUES\n+\n+Ok.\n+\n+1 rows in set. Elapsed: 0.007 sec.\n+\n+:) SELECT x+y from t_null","path":"docs/ru/data_types/nullable.md","position":48,"original_position":48,"commit_id":"6555b05c77d98be699a5cfeeea75fcd8139b8999","original_commit_id":"6555b05c77d98be699a5cfeeea75fcd8139b8999","user":{"login":"blinkov","id":623861,"node_id":"MDQ6VXNlcjYyMzg2MQ==","avatar_url":"https://avatars3.githubusercontent.com/u/623861?v=4","gravatar_id":"","url":"https://api.github.com/users/blinkov","html_url":"https://github.com/blinkov","followers_url":"https://api.github.com/users/blinkov/followers","following_url":"https://api.github.com/users/blinkov/following{/other_user}","gists_url":"https://api.github.com/users/blinkov/gists{/gist_id}","starred_url":"https://api.github.com/users/blinkov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blinkov/subscriptions","organizations_url":"https://api.github.com/users/blinkov/orgs","repos_url":"https://api.github.com/users/blinkov/repos","events_url":"https://api.github.com/users/blinkov/events{/privacy}","received_events_url":"https://api.github.com/users/blinkov/received_events","type":"User","site_admin":false},"body":"Пробелы вокруг плюса ","created_at":"2018-07-26T20:22:34Z","updated_at":"2018-07-26T20:22:34Z","html_url":"https://github.com/yandex/ClickHouse/pull/2730#discussion_r205590297","pull_request_url":"https://api.github.com/repos/yandex/ClickHouse/pulls/2730","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/yandex/ClickHouse/pulls/comments/205590297"},"html":{"href":"https://github.com/yandex/ClickHouse/pull/2730#discussion_r205590297"},"pull_request":{"href":"https://api.github.com/repos/yandex/ClickHouse/pulls/2730"}}},"pull_request":{"url":"https://api.github.com/repos/yandex/ClickHouse/pulls/2730","id":204249458,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA0MjQ5NDU4","html_url":"https://github.com/yandex/ClickHouse/pull/2730","diff_url":"https://github.com/yandex/ClickHouse/pull/2730.diff","patch_url":"https://github.com/yandex/ClickHouse/pull/2730.patch","issue_url":"https://api.github.com/repos/yandex/ClickHouse/issues/2730","number":2730,"state":"open","locked":false,"title":"Nullable fields","user":{"login":"BayoNet","id":2968367,"node_id":"MDQ6VXNlcjI5NjgzNjc=","avatar_url":"https://avatars3.githubusercontent.com/u/2968367?v=4","gravatar_id":"","url":"https://api.github.com/users/BayoNet","html_url":"https://github.com/BayoNet","followers_url":"https://api.github.com/users/BayoNet/followers","following_url":"https://api.github.com/users/BayoNet/following{/other_user}","gists_url":"https://api.github.com/users/BayoNet/gists{/gist_id}","starred_url":"https://api.github.com/users/BayoNet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BayoNet/subscriptions","organizations_url":"https://api.github.com/users/BayoNet/orgs","repos_url":"https://api.github.com/users/BayoNet/repos","events_url":"https://api.github.com/users/BayoNet/events{/privacy}","received_events_url":"https://api.github.com/users/BayoNet/received_events","type":"User","site_admin":false},"body":"I hereby agree to the terms of the CLA available at: https://yandex.ru/legal/cla/?lang=en\r\n","created_at":"2018-07-26T19:54:43Z","updated_at":"2018-07-26T20:22:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4b111fd5720723996e91f8739829cf2e9df94708","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/yandex/ClickHouse/pulls/2730/commits","review_comments_url":"https://api.github.com/repos/yandex/ClickHouse/pulls/2730/comments","review_comment_url":"https://api.github.com/repos/yandex/ClickHouse/pulls/comments{/number}","comments_url":"https://api.github.com/repos/yandex/ClickHouse/issues/2730/comments","statuses_url":"https://api.github.com/repos/yandex/ClickHouse/statuses/6555b05c77d98be699a5cfeeea75fcd8139b8999","head":{"label":"BayoNet:master","ref":"master","sha":"6555b05c77d98be699a5cfeeea75fcd8139b8999","user":{"login":"BayoNet","id":2968367,"node_id":"MDQ6VXNlcjI5NjgzNjc=","avatar_url":"https://avatars3.githubusercontent.com/u/2968367?v=4","gravatar_id":"","url":"https://api.github.com/users/BayoNet","html_url":"https://github.com/BayoNet","followers_url":"https://api.github.com/users/BayoNet/followers","following_url":"https://api.github.com/users/BayoNet/following{/other_user}","gists_url":"https://api.github.com/users/BayoNet/gists{/gist_id}","starred_url":"https://api.github.com/users/BayoNet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BayoNet/subscriptions","organizations_url":"https://api.github.com/users/BayoNet/orgs","repos_url":"https://api.github.com/users/BayoNet/repos","events_url":"https://api.github.com/users/BayoNet/events{/privacy}","received_events_url":"https://api.github.com/users/BayoNet/received_events","type":"User","site_admin":false},"repo":{"id":95412423,"node_id":"MDEwOlJlcG9zaXRvcnk5NTQxMjQyMw==","name":"ClickHouse","full_name":"BayoNet/ClickHouse","owner":{"login":"BayoNet","id":2968367,"node_id":"MDQ6VXNlcjI5NjgzNjc=","avatar_url":"https://avatars3.githubusercontent.com/u/2968367?v=4","gravatar_id":"","url":"https://api.github.com/users/BayoNet","html_url":"https://github.com/BayoNet","followers_url":"https://api.github.com/users/BayoNet/followers","following_url":"https://api.github.com/users/BayoNet/following{/other_user}","gists_url":"https://api.github.com/users/BayoNet/gists{/gist_id}","starred_url":"https://api.github.com/users/BayoNet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BayoNet/subscriptions","organizations_url":"https://api.github.com/users/BayoNet/orgs","repos_url":"https://api.github.com/users/BayoNet/repos","events_url":"https://api.github.com/users/BayoNet/events{/privacy}","received_events_url":"https://api.github.com/users/BayoNet/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/BayoNet/ClickHouse","description":"ClickHouse is a free analytic DBMS for big data.","fork":true,"url":"https://api.github.com/repos/BayoNet/ClickHouse","forks_url":"https://api.github.com/repos/BayoNet/ClickHouse/forks","keys_url":"https://api.github.com/repos/BayoNet/ClickHouse/keys{/key_id}","collaborators_url":"https://api.github.com/repos/BayoNet/ClickHouse/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/BayoNet/ClickHouse/teams","hooks_url":"https://api.github.com/repos/BayoNet/ClickHouse/hooks","issue_events_url":"https://api.github.com/repos/BayoNet/ClickHouse/issues/events{/number}","events_url":"https://api.github.com/repos/BayoNet/ClickHouse/events","assignees_url":"https://api.github.com/repos/BayoNet/ClickHouse/assignees{/user}","branches_url":"https://api.github.com/repos/BayoNet/ClickHouse/branches{/branch}","tags_url":"https://api.github.com/repos/BayoNet/ClickHouse/tags","blobs_url":"https://api.github.com/repos/BayoNet/ClickHouse/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/BayoNet/ClickHouse/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/BayoNet/ClickHouse/git/refs{/sha}","trees_url":"https://api.github.com/repos/BayoNet/ClickHouse/git/trees{/sha}","statuses_url":"https://api.github.com/repos/BayoNet/ClickHouse/statuses/{sha}","languages_url":"https://api.github.com/repos/BayoNet/ClickHouse/languages","stargazers_url":"https://api.github.com/repos/BayoNet/ClickHouse/stargazers","contributors_url":"https://api.github.com/repos/BayoNet/ClickHouse/contributors","subscribers_url":"https://api.github.com/repos/BayoNet/ClickHouse/subscribers","subscription_url":"https://api.github.com/repos/BayoNet/ClickHouse/subscription","commits_url":"https://api.github.com/repos/BayoNet/ClickHouse/commits{/sha}","git_commits_url":"https://api.github.com/repos/BayoNet/ClickHouse/git/commits{/sha}","comments_url":"https://api.github.com/repos/BayoNet/ClickHouse/comments{/number}","issue_comment_url":"https://api.github.com/repos/BayoNet/ClickHouse/issues/comments{/number}","contents_url":"https://api.github.com/repos/BayoNet/ClickHouse/contents/{+path}","compare_url":"https://api.github.com/repos/BayoNet/ClickHouse/compare/{base}...{head}","merges_url":"https://api.github.com/repos/BayoNet/ClickHouse/merges","archive_url":"https://api.github.com/repos/BayoNet/ClickHouse/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/BayoNet/ClickHouse/downloads","issues_url":"https://api.github.com/repos/BayoNet/ClickHouse/issues{/number}","pulls_url":"https://api.github.com/repos/BayoNet/ClickHouse/pulls{/number}","milestones_url":"https://api.github.com/repos/BayoNet/ClickHouse/milestones{/number}","notifications_url":"https://api.github.com/repos/BayoNet/ClickHouse/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/BayoNet/ClickHouse/labels{/name}","releases_url":"https://api.github.com/repos/BayoNet/ClickHouse/releases{/id}","deployments_url":"https://api.github.com/repos/BayoNet/ClickHouse/deployments","created_at":"2017-06-26T05:44:22Z","updated_at":"2018-07-26T19:46:25Z","pushed_at":"2018-07-26T19:45:16Z","git_url":"git://github.com/BayoNet/ClickHouse.git","ssh_url":"git@github.com:BayoNet/ClickHouse.git","clone_url":"https://github.com/BayoNet/ClickHouse.git","svn_url":"https://github.com/BayoNet/ClickHouse","homepage":"https://clickhouse.yandex","size":86249,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"yandex:master","ref":"master","sha":"9242588449d7492e7cd47b13e9df3148b1452994","user":{"login":"yandex","id":7409213,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc0MDkyMTM=","avatar_url":"https://avatars1.githubusercontent.com/u/7409213?v=4","gravatar_id":"","url":"https://api.github.com/users/yandex","html_url":"https://github.com/yandex","followers_url":"https://api.github.com/users/yandex/followers","following_url":"https://api.github.com/users/yandex/following{/other_user}","gists_url":"https://api.github.com/users/yandex/gists{/gist_id}","starred_url":"https://api.github.com/users/yandex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yandex/subscriptions","organizations_url":"https://api.github.com/users/yandex/orgs","repos_url":"https://api.github.com/users/yandex/repos","events_url":"https://api.github.com/users/yandex/events{/privacy}","received_events_url":"https://api.github.com/users/yandex/received_events","type":"Organization","site_admin":false},"repo":{"id":60246359,"node_id":"MDEwOlJlcG9zaXRvcnk2MDI0NjM1OQ==","name":"ClickHouse","full_name":"yandex/ClickHouse","owner":{"login":"yandex","id":7409213,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc0MDkyMTM=","avatar_url":"https://avatars1.githubusercontent.com/u/7409213?v=4","gravatar_id":"","url":"https://api.github.com/users/yandex","html_url":"https://github.com/yandex","followers_url":"https://api.github.com/users/yandex/followers","following_url":"https://api.github.com/users/yandex/following{/other_user}","gists_url":"https://api.github.com/users/yandex/gists{/gist_id}","starred_url":"https://api.github.com/users/yandex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yandex/subscriptions","organizations_url":"https://api.github.com/users/yandex/orgs","repos_url":"https://api.github.com/users/yandex/repos","events_url":"https://api.github.com/users/yandex/events{/privacy}","received_events_url":"https://api.github.com/users/yandex/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/yandex/ClickHouse","description":"ClickHouse is a free analytic DBMS for big data.","fork":false,"url":"https://api.github.com/repos/yandex/ClickHouse","forks_url":"https://api.github.com/repos/yandex/ClickHouse/forks","keys_url":"https://api.github.com/repos/yandex/ClickHouse/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yandex/ClickHouse/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yandex/ClickHouse/teams","hooks_url":"https://api.github.com/repos/yandex/ClickHouse/hooks","issue_events_url":"https://api.github.com/repos/yandex/ClickHouse/issues/events{/number}","events_url":"https://api.github.com/repos/yandex/ClickHouse/events","assignees_url":"https://api.github.com/repos/yandex/ClickHouse/assignees{/user}","branches_url":"https://api.github.com/repos/yandex/ClickHouse/branches{/branch}","tags_url":"https://api.github.com/repos/yandex/ClickHouse/tags","blobs_url":"https://api.github.com/repos/yandex/ClickHouse/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yandex/ClickHouse/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yandex/ClickHouse/git/refs{/sha}","trees_url":"https://api.github.com/repos/yandex/ClickHouse/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yandex/ClickHouse/statuses/{sha}","languages_url":"https://api.github.com/repos/yandex/ClickHouse/languages","stargazers_url":"https://api.github.com/repos/yandex/ClickHouse/stargazers","contributors_url":"https://api.github.com/repos/yandex/ClickHouse/contributors","subscribers_url":"https://api.github.com/repos/yandex/ClickHouse/subscribers","subscription_url":"https://api.github.com/repos/yandex/ClickHouse/subscription","commits_url":"https://api.github.com/repos/yandex/ClickHouse/commits{/sha}","git_commits_url":"https://api.github.com/repos/yandex/ClickHouse/git/commits{/sha}","comments_url":"https://api.github.com/repos/yandex/ClickHouse/comments{/number}","issue_comment_url":"https://api.github.com/repos/yandex/ClickHouse/issues/comments{/number}","contents_url":"https://api.github.com/repos/yandex/ClickHouse/contents/{+path}","compare_url":"https://api.github.com/repos/yandex/ClickHouse/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yandex/ClickHouse/merges","archive_url":"https://api.github.com/repos/yandex/ClickHouse/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yandex/ClickHouse/downloads","issues_url":"https://api.github.com/repos/yandex/ClickHouse/issues{/number}","pulls_url":"https://api.github.com/repos/yandex/ClickHouse/pulls{/number}","milestones_url":"https://api.github.com/repos/yandex/ClickHouse/milestones{/number}","notifications_url":"https://api.github.com/repos/yandex/ClickHouse/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yandex/ClickHouse/labels{/name}","releases_url":"https://api.github.com/repos/yandex/ClickHouse/releases{/id}","deployments_url":"https://api.github.com/repos/yandex/ClickHouse/deployments","created_at":"2016-06-02T08:28:18Z","updated_at":"2018-07-26T18:36:10Z","pushed_at":"2018-07-26T19:54:44Z","git_url":"git://github.com/yandex/ClickHouse.git","ssh_url":"git@github.com:yandex/ClickHouse.git","clone_url":"https://github.com/yandex/ClickHouse.git","svn_url":"https://github.com/yandex/ClickHouse","homepage":"https://clickhouse.yandex","size":90610,"stargazers_count":4367,"watchers_count":4367,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":684,"mirror_url":null,"archived":false,"open_issues_count":493,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":684,"open_issues":493,"watchers":4367,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/yandex/ClickHouse/pulls/2730"},"html":{"href":"https://github.com/yandex/ClickHouse/pull/2730"},"issue":{"href":"https://api.github.com/repos/yandex/ClickHouse/issues/2730"},"comments":{"href":"https://api.github.com/repos/yandex/ClickHouse/issues/2730/comments"},"review_comments":{"href":"https://api.github.com/repos/yandex/ClickHouse/pulls/2730/comments"},"review_comment":{"href":"https://api.github.com/repos/yandex/ClickHouse/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/yandex/ClickHouse/pulls/2730/commits"},"statuses":{"href":"https://api.github.com/repos/yandex/ClickHouse/statuses/6555b05c77d98be699a5cfeeea75fcd8139b8999"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"blinkov"}}