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

Rakesh Raushan updated SPARK-31106:
-----------------------------------
    Description: 
This function will allow users to verify whether the given string is valid JSON 
or not. It returns `true` for valid JSON and `false` for invalid JSON. `NULL` 
is returned for `NULL` input.

DBMSs supporting this functions are :
 * MySQL
 * SQL Server
 * Sqlite
 * MariaDB
 * Amazon Redshift
 * IBM Db2

  was:
Currently, null is returned when we come across invalid json. We should either 
throw an exception for invalid json or false should be returned, like in other 
DBMSs. Like in `json_array_length` function we need to return NULL for null 
array. So this might confuse users.

 

DBMSs supporting this functions are :
 * MySQL
 * SQL Server
 * Sqlite
 * MariaDB
 * Amazon Redshift


> Support is_json function
> ------------------------
>
>                 Key: SPARK-31106
>                 URL: https://issues.apache.org/jira/browse/SPARK-31106
>             Project: Spark
>          Issue Type: New Feature
>          Components: SQL
>    Affects Versions: 3.1.0
>            Reporter: Rakesh Raushan
>            Priority: Major
>
> This function will allow users to verify whether the given string is valid 
> JSON or not. It returns `true` for valid JSON and `false` for invalid JSON. 
> `NULL` is returned for `NULL` input.
> DBMSs supporting this functions are :
>  * MySQL
>  * SQL Server
>  * Sqlite
>  * MariaDB
>  * Amazon Redshift
>  * IBM Db2



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to