Skip to content

Ordering using natural string order comparison#6807

Closed
madsbk wants to merge 1 commit intodask:masterfrom
madsbk:order_using_zfill
Closed

Ordering using natural string order comparison#6807
madsbk wants to merge 1 commit intodask:masterfrom
madsbk:order_using_zfill

Conversation

@madsbk
Copy link
Contributor

@madsbk madsbk commented Nov 5, 2020

Now that the scheduler does the task ordering, we need to order key strings natual when tie-breaking in order.order():

 "('name', 1)" < "('name', 10)"
  • Tests added / passed
  • Passes black dask / flake8 dask

HACK: we zerofill 9 decimals, which should be enough in all but extreme cases.
"""
value = str(match.group())[2:]
return value.zfill(9)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems like it might be expensive. I recommend that we wait on this for a bit.

@madsbk madsbk closed this Feb 16, 2021
@madsbk madsbk deleted the order_using_zfill branch February 16, 2021 08:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants