Uploaded image for project: 'Apache AsterixDB'
  1. Apache AsterixDB
  2. ASTERIXDB-1164

Indeterministic string codepoint function behavior

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • None
    • None
    • FUN - Functions
    • master (97dd45d2d4426bcb1a3971f021839dbfd7993fc2) on Windows

    Description

      Repeatedly executing the same codepoint-to-string(string-to-codepoint($u.name)) query shown below results in completely different output. Two examples follow the offending query.

      I was unable to reproduce after a few tries with just codepoint-to-string.

      Query:

      use dataverse TinySocial;
      for $u in dataset FacebookUsers
      let $codepoint := string-to-codepoint($u.name)
      return

      {"string" : codepoint-to-string($codepoint), "codepoint": $codepoint}

      Sample Output:

      [ { "string": "WilliiWynne\u0004", "codepoint": [ 87, 105, 108, 108, 105, 115, 87, 121, 110, 110, 101 ] }
      , { "string": "MargaritaStoddard", "codepoint": [ 77, 97, 114, 103, 97, 114, 105, 116, 97, 83, 116, 111, 100, 100, 97, 114, 100 ] }
      , { "string": "IsbelDull", "codepoint": [ 73, 115, 98, 101, 108, 68, 117, 108, 108 ] }
      , { "string": "NicholasStroh", "codepoint": [ 78, 105, 99, 104, 111, 108, 97, 115, 83, 116, 114, 111, 104 ] }
      , { "string": "WilaMilyiron", "codepoint": [ 78, 105, 108, 97, 77, 105, 108, 108, 105, 114, 111, 110 ] }
      , { "string": "WoodrowNehling", "codepoint": [ 87, 111, 111, 100, 114, 111, 119, 78, 101, 104, 108, 105, 110, 103 ] }
      , { "string": "BramHatch", "codepoint": [ 66, 114, 97, 109, 72, 97, 116, 99, 104 ] }
      , { "string": "EmoryUnk", "codepoint": [ 69, 109, 111, 114, 121, 85, 110, 107 ] }
      , { "string": "VonKemble", "codepoint": [ 86, 111, 110, 75, 101, 109, 98, 108, 101 ] }
      , { "string": "SuzannaTillson", "codepoint": [ 83, 117, 122, 97, 110, 110, 97, 84, 105, 108, 108, 115, 111, 110 ] }
       ]
      
      [ { "string": "WillisWynne", "codepoint": [ 87, 105, 108, 108, 105, 115, 87, 121, 110, 110, 101 ] }
      , { "string": "MargaritaStoddard", "codepoint": [ 77, 97, 114, 103, 97, 114, 105, 116, 97, 83, 116, 111, 100, 100, 97, 114, 100 ] }
      , { "string": "IsbelDull", "codepoint": [ 73, 115, 98, 101, 108, 68, 117, 108, 108 ] }
      , { "string": "NicholasStroh", "codepoint": [ 78, 105, 99, 104, 111, 108, 97, 115, 83, 116, 114, 111, 104 ] }
      , { "string": "NilaMilliron\u0004\u0000\u0000\u0000j", "codepoint": [ 78, 105, 108, 97, 77, 105, 108, 108, 105, 114, 111, 110 ] }
      , { "string": "WoodrowNehling", "codepoint": [ 87, 111, 111, 100, 114, 111, 119, 78, 101, 104, 108, 105, 110, 103 ] }
      , { "string": "BramHatch", "codepoint": [ 66, 114, 97, 109, 72, 97, 116, 99, 104 ] }
      , { "string": "EmoryUnk", "codepoint": [ 69, 109, 111, 114, 121, 85, 110, 107 ] }
      , { "string": "VonKemble", "codepoint": [ 86, 111, 110, 75, 101, 109, 98, 108, 101 ] }
      , { "string": "SuzannaTillson", "codepoint": [ 83, 117, 122, 97, 110, 110, 97, 84, 105, 108, 108, 115, 111, 110 ] }
       ]
      

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            javierjia Jianfeng Jia
            csamak Cameron Samak
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment