asterixdb-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Cameron Samak (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (ASTERIXDB-1164) Indeterministic string codepoint function behavior
Date Sun, 08 Nov 2015 21:57:11 GMT

     [ https://issues.apache.org/jira/browse/ASTERIXDB-1164?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Cameron Samak updated ASTERIXDB-1164:
-------------------------------------
    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:

{code:JavaScript}
[ { "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 ] }
 ]
{code}

  was:
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 ] }
 ]


> Indeterministic string codepoint function behavior
> --------------------------------------------------
>
>                 Key: ASTERIXDB-1164
>                 URL: https://issues.apache.org/jira/browse/ASTERIXDB-1164
>             Project: Apache AsterixDB
>          Issue Type: Bug
>          Components: Functions - AQL
>         Environment: master (97dd45d2d4426bcb1a3971f021839dbfd7993fc2) on Windows
>            Reporter: Cameron Samak
>
> 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:
> {code:JavaScript}
> [ { "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 ] }
>  ]
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message