snuyanzin commented on PR #28688:
URL: https://github.com/apache/flink/pull/28688#issuecomment-5023810515

   I think I found another issue:
   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


-- 
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]

Reply via email to