Skip to content

branch-4.1: [feat](jni-writer) Support JNI-based write framework for custom writers (#60756) - #61405

Merged
morningman merged 1 commit into
apache:branch-4.1from
morningman:41_bp60756
Mar 17, 2026
Merged

branch-4.1: [feat](jni-writer) Support JNI-based write framework for custom writers (#60756)#61405
morningman merged 1 commit into
apache:branch-4.1from
morningman:41_bp60756

Conversation

@morningman

Copy link
Copy Markdown
Contributor

…rs (apache#60756)
### What problem does this PR solve?
Related apache#60768
Introduce a symmetric JNI writer mechanism that complements the existing
JNI scanner framework, enabling custom file writers to be implemented in
Java and invoked through JNI from the C++ query executor.
Key changes:
- Add VJniFormatTransformer for delegating writes to Java via JNI
- Extend TTVFTableSink with writer_type and writer_class fields
- Add JniWriter base class and LocalFileJniWriter reference
implementation
- Integrate with file_format_transformer factory routing logic
The implementation follows the same patterns as JniScanner for
consistency:
- Reuses class loading mechanism (Jni::Util::get_jni_scanner_class)
- Mirrors constructor signature: (int batchSize, Map<String,String>
params)
- Supports schema caching and performance instrumentation
@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?

@morningman

Copy link
Copy Markdown
ContributorAuthor

run buildall

@doris-robot

Copy link
Copy Markdown

BE UT Coverage Report

Increment line coverage 0.00% (0/107) 🎉

Increment coverage report
Complete coverage report

CategoryCoverage
Function Coverage52.88% (19288/36478)
Line Coverage36.20% (180107/497539)
Region Coverage32.72% (139342/425839)
Branch Coverage33.76% (60624/179587)

@github-actionsgithub-actionsBot added the approved Indicates a PR has been approved by one committer. label Mar 17, 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.

@hello-stephen

Copy link
Copy Markdown
Contributor

Cloud UT Coverage Report

Increment line coverage 🎉

Increment coverage report
Complete coverage report

CategoryCoverage
Function Coverage79.15% (1788/2259)
Line Coverage64.42% (31940/49580)
Region Coverage65.24% (15980/24496)
Branch Coverage55.87% (8511/15234)

@hello-stephen

Copy link
Copy Markdown
Contributor

BE Regression && UT Coverage Report

Increment line coverage 0.00% (0/107) 🎉

Increment coverage report
Complete coverage report

CategoryCoverage
Function Coverage71.38% (25491/35713)
Line Coverage54.11% (268747/496655)
Region Coverage51.63% (222048/430114)
Branch Coverage53.13% (95756/180232)

@morningman

Copy link
Copy Markdown
ContributorAuthor

run vault_p0

@morningman
morningman merged commit f74e7dc into apache:branch-4.1Mar 17, 2026
25 of 29 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approvedIndicates a PR has been approved by one committer.reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@morningman@hello-stephen@doris-robot@yiguolei