{"action":"created","issue":{"url":"https://api.github.com/repos/cmu-db/peloton/issues/1223","repository_url":"https://api.github.com/repos/cmu-db/peloton","labels_url":"https://api.github.com/repos/cmu-db/peloton/issues/1223/labels{/name}","comments_url":"https://api.github.com/repos/cmu-db/peloton/issues/1223/comments","events_url":"https://api.github.com/repos/cmu-db/peloton/issues/1223/events","html_url":"https://github.com/cmu-db/peloton/issues/1223","id":308325996,"number":1223,"title":"Updates change the order and offset of attributes","user":{"login":"latelatif","id":25693934,"avatar_url":"https://avatars3.githubusercontent.com/u/25693934?v=4","gravatar_id":"","url":"https://api.github.com/users/latelatif","html_url":"https://github.com/latelatif","followers_url":"https://api.github.com/users/latelatif/followers","following_url":"https://api.github.com/users/latelatif/following{/other_user}","gists_url":"https://api.github.com/users/latelatif/gists{/gist_id}","starred_url":"https://api.github.com/users/latelatif/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/latelatif/subscriptions","organizations_url":"https://api.github.com/users/latelatif/orgs","repos_url":"https://api.github.com/users/latelatif/repos","events_url":"https://api.github.com/users/latelatif/events{/privacy}","received_events_url":"https://api.github.com/users/latelatif/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"pmenon","id":243434,"avatar_url":"https://avatars0.githubusercontent.com/u/243434?v=4","gravatar_id":"","url":"https://api.github.com/users/pmenon","html_url":"https://github.com/pmenon","followers_url":"https://api.github.com/users/pmenon/followers","following_url":"https://api.github.com/users/pmenon/following{/other_user}","gists_url":"https://api.github.com/users/pmenon/gists{/gist_id}","starred_url":"https://api.github.com/users/pmenon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pmenon/subscriptions","organizations_url":"https://api.github.com/users/pmenon/orgs","repos_url":"https://api.github.com/users/pmenon/repos","events_url":"https://api.github.com/users/pmenon/events{/privacy}","received_events_url":"https://api.github.com/users/pmenon/received_events","type":"User","site_admin":false},"assignees":[{"login":"pmenon","id":243434,"avatar_url":"https://avatars0.githubusercontent.com/u/243434?v=4","gravatar_id":"","url":"https://api.github.com/users/pmenon","html_url":"https://github.com/pmenon","followers_url":"https://api.github.com/users/pmenon/followers","following_url":"https://api.github.com/users/pmenon/following{/other_user}","gists_url":"https://api.github.com/users/pmenon/gists{/gist_id}","starred_url":"https://api.github.com/users/pmenon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pmenon/subscriptions","organizations_url":"https://api.github.com/users/pmenon/orgs","repos_url":"https://api.github.com/users/pmenon/repos","events_url":"https://api.github.com/users/pmenon/events{/privacy}","received_events_url":"https://api.github.com/users/pmenon/received_events","type":"User","site_admin":false}],"milestone":null,"comments":1,"created_at":"2018-03-25T06:23:27Z","updated_at":"2018-03-26T14:18:29Z","closed_at":null,"author_association":"NONE","body":"While working on delta records for logging, I came across this behavior for updates:\r\n```\r\npostgres=# create table foo(id integer, year integer);\r\nCREATE TABLE\r\npostgres=# insert into foo values(5, 400);\r\nINSERT 0 1\r\npostgres=# select * from foo;\r\n id | year \r\n----+------\r\n  5 |  400\r\n(1 row)\r\n\r\npostgres=#  update foo set year=year*2, id=id*2;\r\nUPDATE 1\r\npostgres=# select * from foo;\r\n id  | year \r\n-----+------\r\n 800 |   10\r\n(1 row)\r\n\r\npostgres=#  update foo set year=year*2, id=id*2;\r\nUPDATE 1\r\npostgres=# select * from foo;\r\n id | year \r\n----+------\r\n 20 | 1600\r\n(1 row)\r\n```\r\nAs can be seen above in the trace, the column values are flipped after the first update and they are flipped again after the second update. It is not just that the values are re-ordered in the output of the select query, the actual offsets in target_list_ are also changed. I just log the column offset and the updated values from codegen for the above operations. The logging information is as follows:\r\n\r\n2018-03-23 06:50:29 [src/logging/log_buffer.cpp:88:WriteRecord] INFO  - Offset 1 updated value 800\r\n2018-03-23 06:50:29 [src/logging/log_buffer.cpp:88:WriteRecord] INFO  - Offset 0 updated value 10\r\n2018-03-23 06:50:42 [src/logging/log_buffer.cpp:88:WriteRecord] INFO  - Offset 1 updated value 20\r\n2018-03-23 06:50:42 [src/logging/log_buffer.cpp:88:WriteRecord] INFO  - Offset 0 updated value 1600"},"comment":{"url":"https://api.github.com/repos/cmu-db/peloton/issues/comments/376181974","html_url":"https://github.com/cmu-db/peloton/issues/1223#issuecomment-376181974","issue_url":"https://api.github.com/repos/cmu-db/peloton/issues/1223","id":376181974,"user":{"login":"pervazea","id":34660288,"avatar_url":"https://avatars2.githubusercontent.com/u/34660288?v=4","gravatar_id":"","url":"https://api.github.com/users/pervazea","html_url":"https://github.com/pervazea","followers_url":"https://api.github.com/users/pervazea/followers","following_url":"https://api.github.com/users/pervazea/following{/other_user}","gists_url":"https://api.github.com/users/pervazea/gists{/gist_id}","starred_url":"https://api.github.com/users/pervazea/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pervazea/subscriptions","organizations_url":"https://api.github.com/users/pervazea/orgs","repos_url":"https://api.github.com/users/pervazea/repos","events_url":"https://api.github.com/users/pervazea/events{/privacy}","received_events_url":"https://api.github.com/users/pervazea/received_events","type":"User","site_admin":false},"created_at":"2018-03-26T14:18:29Z","updated_at":"2018-03-26T14:18:29Z","author_association":"CONTRIBUTOR","body":"Which is reported in #1222 "}}
{"actor":{"display_login":"pervazea"}}