)]}'
{"ceilometer/storage/impl_sqlalchemy.py":[{"author":{"_account_id":7478,"name":"Nadya Shakhat","email":"nadmi4@gmail.com","username":"nprivalova"},"change_message_id":"72aad7c4411ba4568d207f53a690ba5bad0991b2","unresolved":false,"context_lines":[{"line_number":82,"context_line":"              project_id: project uuid      (-\u003eproject.id)"},{"line_number":83,"context_line":"              user_id: user uuid            (-\u003euser.id)"},{"line_number":84,"context_line":"              }"},{"line_number":85,"context_line":"        - sourceassoc"},{"line_number":86,"context_line":"          - the relationships"},{"line_number":87,"context_line":"          - { meter_id: sample id           (-\u003esample.id)"},{"line_number":88,"context_line":"              project_id: project uuid      (-\u003eproject.id)"}],"source_content_type":"text/x-python","patch_set":23,"id":"AAAAUX%2F%2B5xU%3D","line":85,"updated":"2014-02-18 10:39:18.000000000","message":"This schema was not changed. I suspect that \"meter_id\" doesn\u0027t reflect things, looks like sample_id should be here","commit_id":"17c0e757c2cb917904c65e6dc6c1e20b351399bd"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"b954cdc8112441e4022233d006cd7963c9989f0d","unresolved":false,"context_lines":[{"line_number":82,"context_line":"              project_id: project uuid      (-\u003eproject.id)"},{"line_number":83,"context_line":"              user_id: user uuid            (-\u003euser.id)"},{"line_number":84,"context_line":"              }"},{"line_number":85,"context_line":"        - sourceassoc"},{"line_number":86,"context_line":"          - the relationships"},{"line_number":87,"context_line":"          - { meter_id: sample id           (-\u003esample.id)"},{"line_number":88,"context_line":"              project_id: project uuid      (-\u003eproject.id)"}],"source_content_type":"text/x-python","patch_set":23,"id":"AAAAUX%2F%2B39Y%3D","line":85,"in_reply_to":"AAAAUX%2F%2B5xU%3D","updated":"2014-02-18 14:00:02.000000000","message":"you\u0027re right. bad rebase on my part.","commit_id":"17c0e757c2cb917904c65e6dc6c1e20b351399bd"},{"author":{"_account_id":7478,"name":"Nadya Shakhat","email":"nadmi4@gmail.com","username":"nprivalova"},"change_message_id":"72aad7c4411ba4568d207f53a690ba5bad0991b2","unresolved":false,"context_lines":[{"line_number":535,"context_line":"        #  (SELECT max(sample.id) AS id FROM sample"},{"line_number":536,"context_line":"        #   GROUP BY sample.resource_id, meter.name) AS anon_2"},{"line_number":537,"context_line":"        # ON sample.id \u003d anon_2.id"},{"line_number":538,"context_line":""},{"line_number":539,"context_line":"        query_sample \u003d session.query(models.MeterSample).\\"},{"line_number":540,"context_line":"            join(subquery_sample,"},{"line_number":541,"context_line":"                 models.MeterSample.id \u003d\u003d subquery_sample.c.id)"}],"source_content_type":"text/x-python","patch_set":23,"id":"AAAAUX%2F%2B5d8%3D","line":538,"updated":"2014-02-18 10:39:18.000000000","message":"It looks unparseble for me :( I\u0027m not an sql-expert but here how I see it: We had Meter table, then rename Meter\u003d\u003eSample and extract a new Meter table from Sample table. I\u0027m ok with these steps. But existence of MeterSample table breaks all efforts for me. I understand that it may be done to make everything faster but ... One more thought: the model that you are achieving by all of crs doesn\u0027t correspond with API-model (your Meter is not api.Meter). I\u0027m ok with it because we cannot touch API now. So we have an agreement that in sql-backend we create an additional level of complexity: developer always should keep in mind this discrepancy. I\u0027m ok with it only if \"inside the backend\" the schema will be perfect :) All the things you are doing now has an aim to make schema better inside sql backend, remove duplicate data. So I don\u0027t like MeterSample, but maybe I didn\u0027t get it\u0027s purpose right. Unfortunately, I cannot suggest the \u0027correct\u0027 decision and I\u0027m not sql\u003dexpert so this comment is just my thoughts","commit_id":"17c0e757c2cb917904c65e6dc6c1e20b351399bd"},{"author":{"_account_id":7478,"name":"Nadya Shakhat","email":"nadmi4@gmail.com","username":"nprivalova"},"change_message_id":"73a212734c220859d5d389de4d9bf5ecf70b5701","unresolved":false,"context_lines":[{"line_number":535,"context_line":"        #  (SELECT max(sample.id) AS id FROM sample"},{"line_number":536,"context_line":"        #   GROUP BY sample.resource_id, meter.name) AS anon_2"},{"line_number":537,"context_line":"        # ON sample.id \u003d anon_2.id"},{"line_number":538,"context_line":""},{"line_number":539,"context_line":"        query_sample \u003d session.query(models.MeterSample).\\"},{"line_number":540,"context_line":"            join(subquery_sample,"},{"line_number":541,"context_line":"                 models.MeterSample.id \u003d\u003d subquery_sample.c.id)"}],"source_content_type":"text/x-python","patch_set":23,"id":"AAAAUX%2F%2BweM%3D","line":538,"in_reply_to":"AAAAUX%2F%2B300%3D","updated":"2014-02-19 09:10:07.000000000","message":"I meant that I cannot parse this code :) Yes, I see your point. I was confused by the fact that we make Sample and Meter separate tables but need ther join everywhere. So the question was do we really need to split them up. Now I see that it makes sql-backend better and in the future we will refactor API part to make it more consistent. Am I right? But anyway we should start with backends","commit_id":"17c0e757c2cb917904c65e6dc6c1e20b351399bd"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"b954cdc8112441e4022233d006cd7963c9989f0d","unresolved":false,"context_lines":[{"line_number":535,"context_line":"        #  (SELECT max(sample.id) AS id FROM sample"},{"line_number":536,"context_line":"        #   GROUP BY sample.resource_id, meter.name) AS anon_2"},{"line_number":537,"context_line":"        # ON sample.id \u003d anon_2.id"},{"line_number":538,"context_line":""},{"line_number":539,"context_line":"        query_sample \u003d session.query(models.MeterSample).\\"},{"line_number":540,"context_line":"            join(subquery_sample,"},{"line_number":541,"context_line":"                 models.MeterSample.id \u003d\u003d subquery_sample.c.id)"}],"source_content_type":"text/x-python","patch_set":23,"id":"AAAAUX%2F%2B300%3D","line":538,"in_reply_to":"AAAAUX%2F%2B5d8%3D","updated":"2014-02-18 14:00:02.000000000","message":"not sure what you mean by unparseable... maybe you could explain concern you mean.\n\nbasically the Meter table is to filter out the repeated data we always get in a Sample, (name, unit, type)... the definition...\n\nSample table is the table which stores the data that change regularly (volume, etc...)\n\nthe purpose of the MeterSample is to essentially match the api.Sample model. if you note, MeterSample isn\u0027t actually a table, it\u0027s just a predefined join between Meter and Sample. (essentially what Sample table is right now). it\u0027s really to keep code clean rather than have a bunch of similar join conditions all over the place (also, the complex query code expects a single model passed around).\n\nbecause all the api interactions (sample_filters) work against api.Sample model, it expects meter name, type, volume, project id, etc... all to be in one single model. the MeterSample model gives them that to work against (instead of constantly defining a Meter/Sample join query)","commit_id":"17c0e757c2cb917904c65e6dc6c1e20b351399bd"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"7a6176f84bc6e5084aba82505084a2fdb49cdc15","unresolved":false,"context_lines":[{"line_number":535,"context_line":"        #  (SELECT max(sample.id) AS id FROM sample"},{"line_number":536,"context_line":"        #   GROUP BY sample.resource_id, meter.name) AS anon_2"},{"line_number":537,"context_line":"        # ON sample.id \u003d anon_2.id"},{"line_number":538,"context_line":""},{"line_number":539,"context_line":"        query_sample \u003d session.query(models.MeterSample).\\"},{"line_number":540,"context_line":"            join(subquery_sample,"},{"line_number":541,"context_line":"                 models.MeterSample.id \u003d\u003d subquery_sample.c.id)"}],"source_content_type":"text/x-python","patch_set":23,"id":"AAAAUX%2F%2BuzQ%3D","line":538,"in_reply_to":"AAAAUX%2F%2BweM%3D","updated":"2014-02-19 14:11:27.000000000","message":"oh you mean, my coding sucks... that\u0027s expected :)\n\nyeah. it\u0027s better to split them up even though from api perspective  it should be together... right now we\u0027re storing data in sql as if its nosql which isn\u0027t the greatest.","commit_id":"17c0e757c2cb917904c65e6dc6c1e20b351399bd"}]}
