{"action":"closed","issue":{"url":"https://api.github.com/repos/yandex/ClickHouse/issues/3293","repository_url":"https://api.github.com/repos/yandex/ClickHouse","labels_url":"https://api.github.com/repos/yandex/ClickHouse/issues/3293/labels{/name}","comments_url":"https://api.github.com/repos/yandex/ClickHouse/issues/3293/comments","events_url":"https://api.github.com/repos/yandex/ClickHouse/issues/3293/events","html_url":"https://github.com/yandex/ClickHouse/issues/3293","id":366855234,"node_id":"MDU6SXNzdWUzNjY4NTUyMzQ=","number":3293,"title":"Issue on insert statements when inserting '0' into a DateTime field","user":{"login":"George3d6","id":23587658,"node_id":"MDQ6VXNlcjIzNTg3NjU4","avatar_url":"https://avatars3.githubusercontent.com/u/23587658?v=4","gravatar_id":"","url":"https://api.github.com/users/George3d6","html_url":"https://github.com/George3d6","followers_url":"https://api.github.com/users/George3d6/followers","following_url":"https://api.github.com/users/George3d6/following{/other_user}","gists_url":"https://api.github.com/users/George3d6/gists{/gist_id}","starred_url":"https://api.github.com/users/George3d6/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/George3d6/subscriptions","organizations_url":"https://api.github.com/users/George3d6/orgs","repos_url":"https://api.github.com/users/George3d6/repos","events_url":"https://api.github.com/users/George3d6/events{/privacy}","received_events_url":"https://api.github.com/users/George3d6/received_events","type":"User","site_admin":false},"labels":[{"id":386401510,"node_id":"MDU6TGFiZWwzODY0MDE1MTA=","url":"https://api.github.com/repos/yandex/ClickHouse/labels/question","name":"question","color":"cc317c","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-10-04T15:48:07Z","updated_at":"2018-10-04T16:15:57Z","closed_at":"2018-10-04T16:15:57Z","author_association":"CONTRIBUTOR","body":"I've had some weird issues when inserting the number \"0\" into a timestamp field with the raw insert from files.\r\n\r\nIf I insert a file as such:\r\n\r\n`clickhouse-cleint --query=\"INSERT INTO ... FORMAT TabSeparate < my_file.tsv`\r\n\r\nAnd one of the `DateTime` fields in my table matches with a `0` in the file, I get the following parsing:\r\n\r\n`Column 18,  name: content_end_dt,   type: DateTime,      parsed text: \"0<TAB>0<TAB>None<LINE FEED>1538357239\"`\r\n\r\nEssentially all tabs after the zero are ignored, and clickhouse tries to turn everything up until (and the first value after) the `\\n` into a 'DateTime' String... which is rather weird.\r\n\r\nIf I replace the zero with any other number (e.g. `1`) the problem is gone.\r\n\r\nThis is rather weird behavior since `toDateTime(0)` works just fine inside the database.\r\n\r\nIs this a bug ? Is it expected behavior ? Is there a workaround ?"}}
{"actor":{"display_login":"4ertus2"}}