VasShabu commented on PR #28688:
URL: https://github.com/apache/flink/pull/28688#issuecomment-5024977827
> I think I found another issue (I haven't looked at this case before,
however now just decided to try): there are cases when we can pass value as a
string and as NOT a string for example as a string (quoted with double quotes)
>
> ```sql
> SELECT JSON_LENGTH('"null"'), JSON_LENGTH('"true"'),
JSON_LENGTH('"false"');
> ```
>
> returns `1 1 1` for example NOT a string
>
> ```sql
> SELECT JSON_LENGTH('null'), JSON_LENGTH('true'), JSON_LENGTH('false');
> ```
>
> returns `1 1 1` so far so good
>
> now let's try something weird like as a string
>
> ```sql
> SELECT JSON_LENGTH('"null, true, false"');
> ```
>
> returns `1` (it is just one string)
>
> as NOT a string
>
> ```sql
> SELECT JSON_LENGTH('null, true, false');
> ```
>
> returns `1` and this **wrong** since the json itself is already invalid
@snuyanzin I was having a look at it and jsonLength receives an input of
`JsonValueContext`, At the moment my current hyposthesis is that it is not a
jsonlength issue because when i run `SELECT 'null, true, false' IS JSON`, this
returns true aswell. I will look into why this behaviour occurs in more detail
after other PR issues are solved.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]