Uploaded image for project: 'Phoenix'
  1. Phoenix
  2. PHOENIX-4237

Allow sorting on (Java) collation keys for non-English locales

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.13.0
    • Component/s: None
    • Labels:
      None

      Description

      Strings stored via Phoenix can be composed from a subset of the entire set of Unicode characters. The natural sort order for strings for different languages often differs from the order dictated by the binary representation of the characters of these strings. Java provides the idea of a Collator which given an input string and a (language) locale can generate a Collation Key which can then be used to compare strings in that natural order.

      Salesforce has recently open-sourced grammaticus. IBM has open-sourced ICU4J some time ago. These technologies can be combined to provide a robust new Phoenix function that can be used in an ORDER BY clause to sort strings according to the user's locale.

        Attachments

        1. PHOENIX-4237_v1.patch
          1.23 MB
          James R. Taylor
        2. PHOENIX-4237_v2.patch
          1.23 MB
          Shehzaad Nakhoda
        3. PHOENIX-4237_v3.patch
          36 kB
          Shehzaad Nakhoda

          Issue Links

            Activity

              People

              • Assignee:
                shehzaadn Shehzaad Nakhoda
                Reporter:
                shehzaadn Shehzaad Nakhoda
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: