Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-14677

Calcite engine. Add 32-bit Unicode characters support

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • None
    • Docs Required, Release Notes Required

    Description

      Currently, all SQL string length-dependent functions (length, substr, right, left, lpad, rpad, etc) work correctly only with up to 16-bit Unicode characters. These functions mapped to java String class functions (length, substring, etc), which operates with an array of 16-bit char's. For example, the result of {{"🦆".length()}} will be 2, and the result of SELECT CHAR_LENGTH('🦆') will be 2. 

      Java String class has method offsetByCodePoints which can be used to implement functions that correctly work with 32-bit characters, but there will be a performance drop if this method will be used for all strings. Perhaps we need dedicated functions with 32-bit characters support.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              alex_pl Aleksey Plekhanov
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: