Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

introduce COLLATE_SYMBOLS=false to talor test environments #543

Merged
merged 1 commit into from
May 24, 2021

Conversation

kbrock
Copy link
Collaborator

@kbrock kbrock commented May 21, 2021

Most database ship with locales built in so they are consistent across installations.
Postgres does not ship with locales so it uses the ones in the operating system.

In the locales there is collation, which basically defines how to sort. We will mostly
notice this in the following 2 ways:

  • case sensitive sorting
  • include symbols in the sorting

case sensitive: "B", "E", "c", "d"
non-case Insensitive: "B", "c", "d", "E"
include symbols: "Sams Golf Shop", "Sam's Cantina"
ignore symbols: "Sam's Cantina", "Sams Golf Shop"

In our domain, the ignoring symbols causes some issues:

include symbols: "1/2/3", "1/2/5", "1/4", "12/4"
ignore symbols: "1/2/3", "12/4", "1/2/5", "1/4" (think alphabetic sort: "123", "125", "14", 124")

If you are ordering them to put into a tree, then this gets confusing and
can result in children coming back out of order. This is tricky for arrange.

An option was introduced for the case when symbols are not considered. It essentially
'join' the strings together to simulate ignoring the symbols.

Also do remember, that this is sorting alphabetically rather than numerically. So 14 > 123.

@coveralls
Copy link

coveralls commented May 21, 2021

Coverage Status

Coverage remained the same at 98.068% when pulling 67bb06e on kbrock:collate into 0a1337e on stefankroes:master.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 98.068% when pulling 8304c72 on kbrock:collate into 0a1337e on stefankroes:master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage remained the same at 98.068% when pulling 8304c72 on kbrock:collate into 0a1337e on stefankroes:master.

@kbrock kbrock force-pushed the collate branch 2 times, most recently from 9d5c4c1 to 00920e6 Compare May 21, 2021 23:41
Most database ship with locales built in so they are consistent across installations.
Postgres does not ship with locales so it uses the ones in the operating system.

In the locales there is collation, which basically defines how to sort. We will mostly
notice this in the following 2 ways:

- case sensitive sorting
- include symbols in the sorting

case sensitive: "B", "E", "c", "d"
non-case Insensitive: "B", "c", "d", "E"
include symbols: "Sams Golf Shop", "Sam's Cantina"
ignore symbols: "Sam's Cantina", "Sams Golf Shop"

In our domain, the ignoring symbols causes some issues:

include symbols: "1/2/3", "1/2/5", "1/4", "12/4"
ignore symbols: "1/2/3", "12/4", "1/2/5", "1/4" (think alphabetic sort: "123", "125", "14", 124")

If you are ordering them to put into a tree, then this gets confusing and
can result in children coming back out of order. This is tricky for arrange.

An option was introduced for the case when symbols are not considered. It essentially
'join' the strings together to simulate ignoring the symbols.

Also do remember, that this is sorting alphabetically rather than numerically. So 14 > 123.
@kbrock
Copy link
Collaborator Author

kbrock commented May 24, 2021

kicking (using a newer mysql - hope this fixes ssl connectivity errors and gets this green)

@kbrock kbrock closed this May 24, 2021
@kbrock kbrock reopened this May 24, 2021
@kbrock
Copy link
Collaborator Author

kbrock commented May 24, 2021

this is unreleated to mysql. merging to fix pg issues so hopefully we're only left with mysql issues (and can get this master green)

@kbrock kbrock merged commit e8f67ea into stefankroes:master May 24, 2021
@kbrock kbrock deleted the collate branch May 24, 2021 15:05
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.

None yet

2 participants