Uploaded image for project: 'HPCC'
  1. HPCC
  2. HPCC-20083

ut8 comparison is inconsistent

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • None
    • 7.0.0
    • eclrtl

    Description

      There is an "optimization" in the utf8 comparison code for strings where there are no special characters.

      Unfortunately the optimization is wrong...  It assumes that 'A' < 'a', whereas the Unicode collation code returns 'a' < 'A'.  This can cause inconsistent ordering when the optimization is applied to one pair of strings, but not another - causing a fatal crash in the merge sort code (HPCC-20080).

      E.g. all of the following are true - illustrating the inconsistency:

      output(u8'BC' > u8'BB\u20AC');
      output(u8'BB\u20AC' > u8'Ba');
      output(u8'Ba' > u8'BC');
      

      Attachments

        Issue Links

          Activity

            People

              ghalliday Gavin Halliday
              ghalliday Gavin Halliday
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: