Skip to content

[Feature](multimodal_embed) Support multimodal(file) embed#62147

Open
linrrzqqq wants to merge 5 commits intoapache:masterfrom
linrrzqqq:embed-backup
Open

[Feature](multimodal_embed) Support multimodal(file) embed#62147
linrrzqqq wants to merge 5 commits intoapache:masterfrom
linrrzqqq:embed-backup

Conversation

@linrrzqqq
Copy link
Copy Markdown
Contributor

What problem does this PR solve?

Issue Number: close #xxx

Related PR: #xxx

Problem Summary:

Release note

Support image/video/audio embedding from json.

Supported multimodal_embed AI provider : Gemini(image, video, audio), Qwen(image, video), Voyage(image, video), Jina(image)

Supported authentication methods include IAM + EXTERNAL_ID / AK + SK

-- ima role, video
mysql> SELECT ARRAY_SIZE(
    ->     EMBED(
    ->     'qwen_mul_embed',
    ->     CAST('{
    '>         "uri": "s3://selectdb-qa-test-3/lzq-multimodal-test/video/45944deac7d96c872f559f2ef94ea0a9.mp4",
    '>             "content_type": "video/mp4",
    '>             "provider": "AWS",
    '>             "endpoint": "s3.us-east-1.amazonaws.com",
    '>             "region": "us-east-1",
    '>             "role_arn": "arn:aws:iam::447051187841:role/lzq-role-test",
    '>             "external_id": "1001"
    '>         }' AS JSON)
    ->     )
    -> ) AS video_embed_size;
+------------------+
| video_embed_size |
+------------------+
|             2560 |
+------------------+

-- ima role, video 
mysql> SELECT ARRAY_SIZE(
    ->     EMBED(
    ->         'qwen_mul_embed',
    ->         CAST('{
    '>             "uri": "s3://selectdb-qa-test-3/lzq-multimodal-test/image/ai-agg.png",
    '>             "content_type": "image/png",
    '>             "provider": "AWS",
    '>             "endpoint": "s3.us-east-1.amazonaws.com",
    '>             "region": "us-east-1",
    '>             "role_arn": "arn:aws:iam::447051187841:role/lzq-role-test",
    '>              "external_id": "1001"
    '>         }' AS JSON)
    ->     )
    -> ) AS img_embed_size;
+----------------+
| img_embed_size |
+----------------+
|           2560 |
+----------------+

-- gemini multimodal embed
mysql> SELECT ARRAY_SIZE(
    ->     EMBED(
    ->         'gemini_mul_embed',
    ->         CAST('{
    '>             "uri": "s3://selectdb-qa-test-3/lzq-multimodal-test/image/ai-agg.png",
    '>             "content_type": "image/png",
    '>             "provider": "AWS",
    '>             "endpoint": "s3.us-east-1.amazonaws.com",
    '>             "region": "us-east-1",
    '>             "role_arn": "arn:aws:iam::447051187841:role/lzq-role-test",
    '>              "external_id": "1001"
    '>         }' AS JSON)
    ->     )
    -> ) AS img_embed_size;
+----------------+
| img_embed_size |
+----------------+
|           3072 |
+----------------+

-- ak, sk
Doris> SELECT ARRAY_SIZE(
    ->     EMBED(
    ->         'qwen_mul_embed',
    ->         CAST('{
    '>             "uri": "s3://<bucket>/<key>/test_img.png",
    '>             "content_type": "image/png",
    '>             "endpoint": "cos.ap-hongkong.myqcloud.com",
    '>             "region": "ap-hongkong",
    '>             "ak": "<ak>",
    '>             "sk": "<sk>"
    '>         }' AS JSON)
    ->     )
    -> ) AS img_embed_size_ak_sk;
+----------------------+
| img_embed_size_ak_sk |
+----------------------+
|                 2560 |
+----------------------+

None

Check List (For Author)

  • Test

    • 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
  • Behavior changed:

    • No.
    • Yes.
  • Does this need documentation?

    • No.
    • Yes.

Check List (For Reviewer who merge this PR)

  • Confirm the release note
  • Confirm test cases
  • Confirm document
  • Add branch pick label

@hello-stephen
Copy link
Copy Markdown
Contributor

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?

@linrrzqqq
Copy link
Copy Markdown
Contributor Author

run buildall

@hello-stephen
Copy link
Copy Markdown
Contributor

Cloud UT Coverage Report

Increment line coverage 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 78.48% (1798/2291)
Line Coverage 64.14% (32271/50310)
Region Coverage 64.99% (16174/24886)
Branch Coverage 55.45% (8618/15542)

@linrrzqqq
Copy link
Copy Markdown
Contributor Author

run buildall

@hello-stephen
Copy link
Copy Markdown
Contributor

Cloud UT Coverage Report

Increment line coverage 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 78.48% (1798/2291)
Line Coverage 64.15% (32275/50310)
Region Coverage 65.04% (16185/24886)
Branch Coverage 55.48% (8623/15542)

@linrrzqqq
Copy link
Copy Markdown
Contributor Author

run buildall

@hello-stephen
Copy link
Copy Markdown
Contributor

FE UT Coverage Report

Increment line coverage 17.74% (11/62) 🎉
Increment coverage report
Complete coverage report

@linrrzqqq
Copy link
Copy Markdown
Contributor Author

run beut

@linrrzqqq
Copy link
Copy Markdown
Contributor Author

run buildall

@hello-stephen
Copy link
Copy Markdown
Contributor

Cloud UT Coverage Report

Increment line coverage 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 78.48% (1798/2291)
Line Coverage 64.13% (32265/50312)
Region Coverage 65.09% (16242/24954)
Branch Coverage 55.57% (8675/15610)

@hello-stephen
Copy link
Copy Markdown
Contributor

FE UT Coverage Report

Increment line coverage 17.74% (11/62) 🎉
Increment coverage report
Complete coverage report

@linrrzqqq
Copy link
Copy Markdown
Contributor Author

run beut

@linrrzqqq
Copy link
Copy Markdown
Contributor Author

run buildall

@hello-stephen
Copy link
Copy Markdown
Contributor

FE UT Coverage Report

Increment line coverage 17.74% (11/62) 🎉
Increment coverage report
Complete coverage report

@hello-stephen
Copy link
Copy Markdown
Contributor

BE UT Coverage Report

Increment line coverage 52.17% (240/460) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 52.99% (20133/37996)
Line Coverage 36.55% (189373/518053)
Region Coverage 32.79% (146907/448032)
Branch Coverage 33.90% (64301/189666)

@hello-stephen
Copy link
Copy Markdown
Contributor

BE Regression && UT Coverage Report

Increment line coverage 42.57% (189/444) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 73.63% (27398/37211)
Line Coverage 57.28% (295810/516471)
Region Coverage 54.39% (245919/452165)
Branch Coverage 56.12% (106765/190248)

HappenLee
HappenLee previously approved these changes Apr 10, 2026
Copy link
Copy Markdown
Contributor

@HappenLee HappenLee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Gabriel39
Gabriel39 previously approved these changes Apr 10, 2026
@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Apr 10, 2026
@github-actions
Copy link
Copy Markdown
Contributor

PR approved by at least one committer and no changes requested.

@github-actions
Copy link
Copy Markdown
Contributor

PR approved by anyone and no changes requested.

@linrrzqqq linrrzqqq dismissed stale reviews from Gabriel39 and HappenLee via fd7cffd April 12, 2026 18:54
@github-actions github-actions bot removed the approved Indicates a PR has been approved by one committer. label Apr 12, 2026
@linrrzqqq
Copy link
Copy Markdown
Contributor Author

run buildall

@hello-stephen
Copy link
Copy Markdown
Contributor

Cloud UT Coverage Report

Increment line coverage 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 78.48% (1798/2291)
Line Coverage 64.07% (32258/50345)
Region Coverage 65.05% (16241/24967)
Branch Coverage 55.58% (8681/15620)

@linrrzqqq
Copy link
Copy Markdown
Contributor Author

run beut

@hello-stephen
Copy link
Copy Markdown
Contributor

BE Regression && UT Coverage Report

Increment line coverage 75.90% (337/444) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 71.92% (26772/37224)
Line Coverage 54.86% (283427/516648)
Region Coverage 51.73% (233990/452310)
Branch Coverage 53.22% (101276/190296)

@linrrzqqq
Copy link
Copy Markdown
Contributor Author

run buildall

@hello-stephen
Copy link
Copy Markdown
Contributor

FE UT Coverage Report

Increment line coverage 17.46% (11/63) 🎉
Increment coverage report
Complete coverage report

@hello-stephen
Copy link
Copy Markdown
Contributor

BE Regression && UT Coverage Report

Increment line coverage 75.90% (337/444) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 73.65% (27409/37214)
Line Coverage 57.32% (296074/516527)
Region Coverage 54.50% (246447/452217)
Branch Coverage 56.18% (106882/190233)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants