Skip to content

Conversation

@github-actions
Copy link
Contributor

Cherry-picked from #50308

…complex type (#50308)

### What problem does this PR solve?
here are some functions behavior is not same with mysql as JSON_REPLACE
| JSON_INSERT | JSON_SET | JSON_ARRAY
which json and complex types are not supported before this PR
Follow mysql :
https://dev.mysql.com/doc/refman/8.0/en/json-modification-functions.html#function_json-set
before  we will meet result:
```
mysql> insert into t01 values (1, '{"a":1, "b":2}');
Query OK, 1 row affected (0.25 sec)
{'label':'label_1056456f8d8c46e5_9be38bb344bdd72c', 'status':'VISIBLE', 'txnId':'8019'}

mysql> select b, json_set(b, "$.a", b) from t01;
+---------------+-----------------------+
| b             | json_set(b, "$.a", b) |
+---------------+-----------------------+
| {"a":1,"b":2} | {"a":1,"b":2}         |
+---------------+-----------------------+
```
now 
```
mysql>  select b, json_set(b, "$.a", b) from t01;
+---------------+---------------------------+
| b             | json_set(b, "$.a", b)     |
+---------------+---------------------------+
| {"a":1,"b":2} | {"a":{"a":1,"b":2},"b":2} |
+---------------+---------------------------+
1 row in set (0.12 sec)
```
@github-actions github-actions bot requested a review from yiguolei as a code owner April 24, 2025 02:17
@Thearas
Copy link
Contributor

Thearas commented Apr 24, 2025

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

@dataroaring dataroaring reopened this Apr 24, 2025
@Thearas
Copy link
Contributor

Thearas commented Apr 24, 2025

run buildall

@hello-stephen
Copy link
Contributor

BE UT Coverage Report

Increment line coverage 0.00% (0/2) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 38.83% (10266/26438)
Line Coverage 29.88% (85242/285286)
Region Coverage 28.54% (43946/153976)
Branch Coverage 25.26% (22469/88938)

@hello-stephen
Copy link
Contributor

BE Regression P0 && UT Coverage Report

Increment line coverage 0.00% (0/2) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage
Line Coverage
Region Coverage
Branch Coverage

@yiguolei yiguolei closed this Apr 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants