home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

3 rows where issue = 326205036 and user = 6213168 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

Suggested facets: created_at (date), updated_at (date)

user 1

  • crusaderky · 3 ✖

issue 1

  • How should Dataset.update() handle conflicting coordinates? · 3 ✖

author_association 1

  • MEMBER 3
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
391914654 https://github.com/pydata/xarray/issues/2180#issuecomment-391914654 https://api.github.com/repos/pydata/xarray/issues/2180 MDEyOklzc3VlQ29tbWVudDM5MTkxNDY1NA== crusaderky 6213168 2018-05-25T01:32:51Z 2018-05-25T01:33:25Z MEMBER

If there are conflicts in dimension coordinate, should it be outer join?

Consider this example: a = Dataset({ 'x': [10, 20], 'd1': ('x', [100, 200]), 'd2': ('x', [300, 400]) }) b = Dataset({ 'x': [15], 'd1': ('x', [500]), }) a.update(b) In the above, with anything but an outer join you're destroying d2 - which doesn't even exist in the rhs dataset! A sane, desirable outcome should be Dataset({ 'x': [10, 20, 15], 'd1': ('x', [nan, nan, 500]), 'd2': ('x', [300, 400, nan]) })

If there are no conflicts in dimension coordinate, but there are conflicts in non dimension coordinate, whether left or right should be prioritized?

I think this should be a right join. I alway think of non-index coords as N-to-1 properties of the index. For example, a = Dataset( coords={ 'country': ('country', ['UK', 'France', 'Greece']), 'currency': ('country', ['GBP', 'EUR', 'EUR']), }, data_vars={ 'GDP': ('country', [1000, 2000, 3000]), 'Debt': ('country', [100, 200, 300]), }) b = Dataset( # Greece exits the Eurozone coords={ 'country': ('country', ['UK', 'France', 'Greece']), 'currency': ('country', ['GBP', 'EUR', 'GRD']), }, data_vars={ 'GDP': ('country', [1000, 2000, 150000]), }) a.update(b) In the above example, I just broke the Debt variable - as I forgot to perform a currency conversion for the greek debt, which has been silently changed from 300 EUR to 300 GRD. However I can't see any elegant way to avoid this. I definitely would not like to duplicate the 'country' index.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  How should Dataset.update() handle conflicting coordinates? 326205036
391904059 https://github.com/pydata/xarray/issues/2180#issuecomment-391904059 https://api.github.com/repos/pydata/xarray/issues/2180 MDEyOklzc3VlQ29tbWVudDM5MTkwNDA1OQ== crusaderky 6213168 2018-05-25T00:15:55Z 2018-05-25T00:15:55Z MEMBER

Then I'm not sure I understand the change: fridge = xarray.Dataset( data_vars={ 'fruits': ('fruit', [10]), }, coords={ 'fruit': ('fruit', ['apples']), 'quality': ('fruit', ['Red Velvet']), }) shopping = xarray.Dataset( data_vars={ 'fruits': ('fruit', [20]), }, coords={ 'fruit': ('fruit', ['oranges']), 'quality': ('fruit', ['Tangerine']), }) fridge.update(shopping) # throw away old contents and fill with new stuff In both 0.10.3 and 0.10.4: <xarray.Dataset> Dimensions: (fruit: 1) Coordinates: * fruit (fruit) object 'apples' quality (fruit) object nan Data variables: fruits (fruit) float64 nan The above doesn't make any sense to me. I wanted to replace the fruits variable with brand new content, and instead I lost both the old and the new?!?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  How should Dataset.update() handle conflicting coordinates? 326205036
391900937 https://github.com/pydata/xarray/issues/2180#issuecomment-391900937 https://api.github.com/repos/pydata/xarray/issues/2180 MDEyOklzc3VlQ29tbWVudDM5MTkwMDkzNw== crusaderky 6213168 2018-05-24T23:56:55Z 2018-05-24T23:56:55Z MEMBER

I'm of the strong opinion that all joins should be outer joins unless the user explicitly says otherwise, as it's the approach least prone to do damage. I would humbly suggest considering the change for a future major release (0.11 / 0.12), with several minor releases before that printing futurewarnings.

This said, I think that changing from a right join (0.10.3) to a left join (0.10.4) will only cause breakages without providing any actual benefit in terms of user-friendliness, so we should retain the previous behaviour. A right join vaguely makes more sense IMHO as it follows the general phylosophy of dict.update() where rhs wins in case of collision.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  How should Dataset.update() handle conflicting coordinates? 326205036

Advanced export

JSON shape: default, array, newline-delimited, object

CSV options:

CREATE TABLE [issue_comments] (
   [html_url] TEXT,
   [issue_url] TEXT,
   [id] INTEGER PRIMARY KEY,
   [node_id] TEXT,
   [user] INTEGER REFERENCES [users]([id]),
   [created_at] TEXT,
   [updated_at] TEXT,
   [author_association] TEXT,
   [body] TEXT,
   [reactions] TEXT,
   [performed_via_github_app] TEXT,
   [issue] INTEGER REFERENCES [issues]([id])
);
CREATE INDEX [idx_issue_comments_issue]
    ON [issue_comments] ([issue]);
CREATE INDEX [idx_issue_comments_user]
    ON [issue_comments] ([user]);
Powered by Datasette · Queries took 28.004ms · About: xarray-datasette