{"action":"created","issue":{"url":"https://api.github.com/repos/yandex/ClickHouse/issues/2509","repository_url":"https://api.github.com/repos/yandex/ClickHouse","labels_url":"https://api.github.com/repos/yandex/ClickHouse/issues/2509/labels{/name}","comments_url":"https://api.github.com/repos/yandex/ClickHouse/issues/2509/comments","events_url":"https://api.github.com/repos/yandex/ClickHouse/issues/2509/events","html_url":"https://github.com/yandex/ClickHouse/issues/2509","id":332323619,"node_id":"MDU6SXNzdWUzMzIzMjM2MTk=","number":2509,"title":"Wrong aggregation result?","user":{"login":"AlexMAS","id":816125,"node_id":"MDQ6VXNlcjgxNjEyNQ==","avatar_url":"https://avatars0.githubusercontent.com/u/816125?v=4","gravatar_id":"","url":"https://api.github.com/users/AlexMAS","html_url":"https://github.com/AlexMAS","followers_url":"https://api.github.com/users/AlexMAS/followers","following_url":"https://api.github.com/users/AlexMAS/following{/other_user}","gists_url":"https://api.github.com/users/AlexMAS/gists{/gist_id}","starred_url":"https://api.github.com/users/AlexMAS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlexMAS/subscriptions","organizations_url":"https://api.github.com/users/AlexMAS/orgs","repos_url":"https://api.github.com/users/AlexMAS/repos","events_url":"https://api.github.com/users/AlexMAS/events{/privacy}","received_events_url":"https://api.github.com/users/AlexMAS/received_events","type":"User","site_admin":false},"labels":[{"id":628291301,"node_id":"MDU6TGFiZWw2MjgyOTEzMDE=","url":"https://api.github.com/repos/yandex/ClickHouse/labels/sql-compat","name":"sql-compat","color":"006b75","default":false}],"state":"open","locked":false,"assignee":{"login":"alexey-milovidov","id":18581488,"node_id":"MDQ6VXNlcjE4NTgxNDg4","avatar_url":"https://avatars3.githubusercontent.com/u/18581488?v=4","gravatar_id":"","url":"https://api.github.com/users/alexey-milovidov","html_url":"https://github.com/alexey-milovidov","followers_url":"https://api.github.com/users/alexey-milovidov/followers","following_url":"https://api.github.com/users/alexey-milovidov/following{/other_user}","gists_url":"https://api.github.com/users/alexey-milovidov/gists{/gist_id}","starred_url":"https://api.github.com/users/alexey-milovidov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexey-milovidov/subscriptions","organizations_url":"https://api.github.com/users/alexey-milovidov/orgs","repos_url":"https://api.github.com/users/alexey-milovidov/repos","events_url":"https://api.github.com/users/alexey-milovidov/events{/privacy}","received_events_url":"https://api.github.com/users/alexey-milovidov/received_events","type":"User","site_admin":false},"assignees":[{"login":"alexey-milovidov","id":18581488,"node_id":"MDQ6VXNlcjE4NTgxNDg4","avatar_url":"https://avatars3.githubusercontent.com/u/18581488?v=4","gravatar_id":"","url":"https://api.github.com/users/alexey-milovidov","html_url":"https://github.com/alexey-milovidov","followers_url":"https://api.github.com/users/alexey-milovidov/followers","following_url":"https://api.github.com/users/alexey-milovidov/following{/other_user}","gists_url":"https://api.github.com/users/alexey-milovidov/gists{/gist_id}","starred_url":"https://api.github.com/users/alexey-milovidov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexey-milovidov/subscriptions","organizations_url":"https://api.github.com/users/alexey-milovidov/orgs","repos_url":"https://api.github.com/users/alexey-milovidov/repos","events_url":"https://api.github.com/users/alexey-milovidov/events{/privacy}","received_events_url":"https://api.github.com/users/alexey-milovidov/received_events","type":"User","site_admin":false}],"milestone":null,"comments":1,"created_at":"2018-06-14T09:33:03Z","updated_at":"2018-06-15T02:28:48Z","closed_at":null,"author_association":"NONE","body":"I have an **empty** table:\r\n\r\n```sql\r\ncreate table history\r\n(\r\n    sensorId String,\r\n    date Date default toDate(time),\r\n    time DateTime,\r\n    value Float64\r\n)\r\nENGINE = MergeTree(date, (sensorId, date, time), 8192)\r\n```\r\n\r\nWhen I execute the query:\r\n\r\n```sql\r\nselect min(time) as t from history\r\n```\r\n\r\nI expect `NULL` but receive `0`:\r\n\r\n```\r\n┌───────────────────t─┐\r\n│ 0000-00-00 00:00:00 │\r\n└─────────────────────┘\r\n\r\n1 rows in set. Elapsed: 0.004 sec.\r\n```\r\n\r\nThis behaviour started recently after updating to the latest version - `1.1.54385`.\r\n\r\nIs it correct behaviour?"},"comment":{"url":"https://api.github.com/repos/yandex/ClickHouse/issues/comments/397495007","html_url":"https://github.com/yandex/ClickHouse/issues/2509#issuecomment-397495007","issue_url":"https://api.github.com/repos/yandex/ClickHouse/issues/2509","id":397495007,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NzQ5NTAwNw==","user":{"login":"AlexMAS","id":816125,"node_id":"MDQ6VXNlcjgxNjEyNQ==","avatar_url":"https://avatars0.githubusercontent.com/u/816125?v=4","gravatar_id":"","url":"https://api.github.com/users/AlexMAS","html_url":"https://github.com/AlexMAS","followers_url":"https://api.github.com/users/AlexMAS/followers","following_url":"https://api.github.com/users/AlexMAS/following{/other_user}","gists_url":"https://api.github.com/users/AlexMAS/gists{/gist_id}","starred_url":"https://api.github.com/users/AlexMAS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlexMAS/subscriptions","organizations_url":"https://api.github.com/users/AlexMAS/orgs","repos_url":"https://api.github.com/users/AlexMAS/repos","events_url":"https://api.github.com/users/AlexMAS/events{/privacy}","received_events_url":"https://api.github.com/users/AlexMAS/received_events","type":"User","site_admin":false},"created_at":"2018-06-15T02:28:48Z","updated_at":"2018-06-15T02:28:48Z","author_association":"NONE","body":"Thank you for your reply. Yes, I assumed that was intentional changes. I've added processing for this case to my code so it isn't critical for me. I think we can close this issue."}}
{"actor":{"display_login":"AlexMAS"}}