zhangstar333 opened a new pull request, #69658:
URL: https://github.com/apache/doris/pull/69658

   ### What problem does this PR solve?
   Problem Summary:
   
   ```
   mysql> desc blob_with_id;
   +-------+--------+------+------+---------+-------+
   | Field | Type   | Null | Key  | Default | Extra |
   +-------+--------+------+------+---------+-------+
   | id    | bigint | Yes  | true | NULL    |       |
   | image | FILE   | Yes  | true | NULL    |       |
   +-------+--------+------+------+---------+-------+
   2 rows in set (0.00 sec)
   
   mysql> select * from blob_with_id;
   
+------+--------------------------------------------------------------------------------------------+
   | id   | image                                                               
                       |
   
+------+--------------------------------------------------------------------------------------------+
   |    1 | 
{"uri":null,"offset":null,"size":null,"content_type":null,"checksum":null,"inline":"AQID"}
 |
   |    2 | 
{"uri":null,"offset":null,"size":null,"content_type":null,"checksum":null,"inline":"BAUG"}
 |
   
+------+--------------------------------------------------------------------------------------------+
   2 rows in set (0.62 sec)
   
   mysql> select * from blob_with_id@options("blob-as-descriptor"="true"); // 
return blob descriptor without data
   
+------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
   | id   | image                                                               
                                                                                
                                                       |
   
+------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
   |    1 | 
{"uri":"file:/mnt/disk2/zhangsida/test_paimon/test_blob.db/blob_with_id/bucket-0/data-c94d7440-e3f3-49c9-8735-3e0dbf96e1df-1.blob","offset":4,"size":3,"content_type":null,"checksum":null,"inline":null}
  |
   |    2 | 
{"uri":"file:/mnt/disk2/zhangsida/test_paimon/test_blob.db/blob_with_id/bucket-0/data-c94d7440-e3f3-49c9-8735-3e0dbf96e1df-1.blob","offset":23,"size":3,"content_type":null,"checksum":null,"inline":null}
 |
   
+------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
   2 rows in set (0.47 sec)
   
   mysql> select cast(element_at(image,'inline') as string) from blob_table;
   +--------------------------------------------+
   | cast(element_at(image,'inline') as string) |
   +--------------------------------------------+
   | h                                          |
   | hello world                                |
   +--------------------------------------------+
   2 rows in set (0.68 sec)
   
   
   mysql> set paimon_blob_max_size = 2; default is 10M
   Query OK, 0 rows affected (0.00 sec)
   
   mysql> select id,cast(element_at(image,'inline') as string) from blob_table;
   ERROR 1105 (HY000): errCode = 2, detailMessage = 
(10.26.20.3)[INVALID_ARGUMENT]Paimon BLOB column 'image' inline size 11 bytes 
exceeds paimon_blob_max_size=2 bytes. Increase paimon_blob_max_size or use 
blob-as-descriptor=true
   mysql>
   ```
   
   
   ### Check List (For Author)
   
   - Test <!-- At least one of them must be included. -->
       - [x] Regression test
       - [ ] Unit Test
       - [ ] Manual test (add detailed scripts or steps below)
       - [ ] No need to test or manual test. Explain why:
   - [ ] This is a refactor/code format and no logic has been changed.
           - [ ] Previous test can cover this change. - [ ] No code files have 
been changed. - [ ] Other reason <!-- Add your reason?  -->
   
   - Behavior changed:
       - [ ] No.
       - [ ] Yes. <!-- Explain the behavior change -->
   
   - Does this need documentation?
       - [ ] No.
   - [ ] Yes. <!-- Add document PR link here. eg: 
https://github.com/apache/doris-website/pull/1214 -->
   
   ### Check List (For Reviewer who merge this PR)
   
   - [ ] Confirm the release note
   - [ ] Confirm test cases
   - [ ] Confirm document
   - [ ] Add branch pick label <!-- Add branch pick label that this PR should 
merge into -->
   


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


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

Reply via email to