Skip to content

[test](multi-catalog )Fix branch 4.1 multi-catalog tests.#62363

Draft
kaka11chen wants to merge 16 commits intoapache:branch-4.1from
kaka11chen:fix-branch-4.1-tests
Draft

[test](multi-catalog )Fix branch 4.1 multi-catalog tests.#62363
kaka11chen wants to merge 16 commits intoapache:branch-4.1from
kaka11chen:fix-branch-4.1-tests

Conversation

@kaka11chen
Copy link
Copy Markdown
Contributor

What problem does this PR solve?

Issue Number: close #xxx

Related PR: #xxx

Problem Summary:

Release note

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

kaka11chen and others added 9 commits April 10, 2026 20:22
…e_large_data

Problem Summary: `test_hive_compress_type_large_data` fails because the
second explain block hardcodes `inputSplitNum=16` for `file_split_size=8MB`,
but on multi-BE clusters where `parallelExecInstanceNum * backendNum > 16`,
count pushdown sets `needSplit=true`, causing files to be split by 8MB and
producing 82 splits instead of 16.

The first explain block already used dynamic logic to handle this case, but
the second block did not. Fix: apply the same dynamic expectedSplitNum logic
to both explain blocks.
Problem Summary:

test_export_max_file_size fails intermittently with file count mismatch
(e.g., expected 25, got 23). The test uses random data via rand() which
produces variable-width CSV rows (especially float/double columns), causing
the total exported data size to fluctuate between runs. With max_file_size=5MB,
this leads to different file counts each time.

Fix: Replace exact assertEquals("25", fileNumber) with assertTrue(fileNum > 1)
to verify that file splitting occurs without depending on an exact count.
Data correctness is already verified by subsequent load-back and comparison.
  `paimon-scanner` runs under a dedicated scanner classloader, while `preload-extensions` is loaded from the parent classpath with higher priority. Doris currently uses parent-first classloading for
  scanner jars.

  When `paimon-jindo` is packaged only inside `paimon-scanner`, runtime may still resolve `org.apache.paimon.*` classes from the parent classpath first. In this case, the Paimon `FileIO`/
  `ServiceLoader` view seen at runtime is split across different classloaders, and the Jindo file IO loader is not discovered correctly. This can lead to errors like:

  `org.apache.paimon.fs.UnsupportedSchemeException: Could not find a file io implementation for scheme 'oss'`

  This PR removes `paimon-jindo` from `paimon-scanner` and moves it to `preload-extensions`, so the Jindo FileIO implementation is available from the highest-priority parent classpath and stays
  consistent with the Paimon core classes used during scanner execution.

  This keeps the runtime dependency layout aligned with Doris' existing classloading model and avoids scanner-local plugin jars being hidden by parent-first resolution.
Copilot AI review requested due to automatic review settings April 10, 2026 12:38
@kaka11chen kaka11chen requested a review from yiguolei as a code owner April 10, 2026 12:38
@Thearas
Copy link
Copy Markdown
Contributor

Thearas commented Apr 10, 2026

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?

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates several external/regression tests for multi-catalog environments and also adjusts FE/BE behavior to better handle certain external-table insert/overwrite workflows.

Changes:

  • Adjust external-table regression tests to be less environment-sensitive (split counts, rowsets timing stability, export file count assertion).
  • Add an “execute empty insert” path so Iceberg static partition overwrite can still commit required side effects even when the source is empty.
  • Improve MaxCompute writer block-id allocation to avoid collisions across fragment instances; move paimon-jindo dependency into the preload module.

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
regression-test/suites/external_table_p2/hudi/test_hudi_olap_rewrite_mtmv.groovy Entire Hudi MTMV suite is commented out (test effectively removed).
regression-test/suites/external_table_p2/hive/test_hive_compress_type_large_data.groovy Make expected split counts depend on backend/parallelism.
regression-test/suites/external_table_p0/info_schema_db/test_information_schema_timezone.groovy Add awaitUntil helper to stabilize rowsets timing checks; handle nullable newest write timestamp.
regression-test/suites/external_table_p0/hive/test_parquet_join_runtime_filter.groovy Entire runtime-filter suite is commented out (test effectively removed).
regression-test/suites/export_p2/test_export_max_file_size.groovy Relax export file-number assertion to “> 1” for portability.
regression-test/data/external_table_p2/hudi/hudi_mtmv/test_hudi_olap_rewrite_mtmv.out Remove expected output for the disabled Hudi suite.
fe/fe-core/src/test/java/org/apache/doris/datasource/iceberg/IcebergTransactionTest.java Add test for static partition overwrite with empty source; refactor partition values helper.
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/insert/InsertIntoTableCommand.java Execute a special empty-insert path when required (Iceberg static overwrite).
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/insert/IcebergInsertExecutor.java Determine when an empty insert must still execute for Iceberg static partition overwrite.
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/insert/AbstractInsertExecutor.java Add executeEmptyInsert() and shouldExecuteEmptyInsert() hook.
fe/be-java-extensions/preload-extensions/pom.xml Add paimon-jindo to preload extensions.
fe/be-java-extensions/paimon-scanner/pom.xml Remove paimon-jindo dependency from scanner module.
be/src/exec/sink/writer/maxcompute/vmc_table_writer.h Change block-id strategy to reserve low 32 bits for per-instance sequence.
be/src/exec/sink/writer/maxcompute/vmc_table_writer.cpp Initialize block-id base using per_fragment_instance_idx << 32.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +18 to +22
// suite("test_hudi_olap_rewrite_mtmv", "p2,external,hudi") {
// String enabled = context.config.otherConfigs.get("enableHudiTest")
// if (enabled == null || !enabled.equalsIgnoreCase("true")) {
// logger.info("disable hudi test")
// return
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

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

This file now has the entire suite(...) { ... } block commented out, which means the test no longer runs under any configuration (even when enableHudiTest=true). If the intent is to disable this test on branch 4.1, prefer removing the file (and any related .out data) or adding an explicit skip/early-return with a clear reason, rather than leaving a large commented-out suite that silently drops coverage.

Copilot uses AI. Check for mistakes.
Comment on lines +18 to +22
// import groovy.json.JsonSlurper

// suite("test_parquet_join_runtime_filter", "p0,external,hive,external_docker,external_docker_hive") {

// def getProfileList = {
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

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

This file’s suite(...) is fully commented out, so the runtime filter regression checks are no longer executed at all. If this is meant to be temporarily disabled due to flakiness/environment constraints, it should be gated via config/tags or skipped with an explicit reason (or removed), rather than commenting out the whole suite and silently reducing regression coverage.

Copilot uses AI. Check for mistakes.
Comment on lines +143 to 147
private List<String> createPartitionValues(Instant instant, String str1, String str2, Integer int1) {
long ts = DateTimeUtil.microsFromInstant(instant);
int dt = DateTimeUtil.daysFromInstant(instant);
String dateString = numToDay(dt);

Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

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

With the new createPartitionValues(Instant, ...) overload supporting different instant values, the partition list should derive all time-based partition strings from that instant. Currently the ts3 day partition value is still hard-coded ("2024-12-11"), which makes the generated partition values inconsistent for callers like the new 2024-12-12 test case. Please compute the ts3 (day) value from instant as well (similar to dateString).

Copilot uses AI. Check for mistakes.
Comment on lines 308 to 313
buildResult.planner.getFragments().get(0), buildResult.dataSink,
buildResult.physicalSink
);
} else if (insertExecutor.shouldExecuteEmptyInsert()) {
insertExecutor.beginTransaction();
}
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

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

PR title/description indicate this is a test-only fix, but this change set also modifies production behavior (e.g. insert execution flow for empty inserts / Iceberg static partition overwrite). Please update the PR description (and checklist) to reflect the user-visible/behavioral change and any required validation, or split the functional change into a separate PR if this is intended to be test-only.

Copilot uses AI. Check for mistakes.
…og case (apache#62313)

[test](regression) Shorten generated HMS and DLF identifiers in catalog case (apache#62313)

(cherry picked from commit a395639)
@morningman
Copy link
Copy Markdown
Contributor

run buildall

Issue Number: close #none

Related PR: #none

Problem Summary: Allow thirdparty docker components to derive jar download URLs from a configurable Maven mirror, so environments that cannot access Maven Central can switch to an alternative repository without editing multiple hardcoded URLs.

None

- Test: Manual test
    - Verified bash syntax for updated scripts
    - Verified hudi env rendering with default and mirror-based URLs
    - Verified Aliyun Maven mirror can serve all required jars with HTTP HEAD and ranged GET requests
- Behavior changed: Yes (thirdparty jar download source can now be configured through MAVEN_REPOSITORY_URL)
- Does this need documentation: No
@hello-stephen
Copy link
Copy Markdown
Contributor

FE UT Coverage Report

Increment line coverage 7.14% (2/28) 🎉
Increment coverage report
Complete coverage report

kaka11chen and others added 5 commits April 11, 2026 13:18
…lbacks

Issue Number: close #xxx

Problem Summary:
  download_callback() and move_dir_callback() in task_worker_pool.cpp use
  SnapshotLoader/CloudSnapshotLoader to perform HDFS downloads and file
  moves, but do not attach the MemTracker to the thread context via
  SCOPED_ATTACH_TASK. This causes memory orphan check failures when these
  callbacks allocate memory through HDFS operations, as the allocations
  are not tracked by any MemTrackerLimiter.

  The parallel upload_callback() already has SCOPED_ATTACH_TASK correctly.

  Fix: Add SCOPED_ATTACH_TASK(loader->resource_ctx()) in all four missing
  locations:
  - download_callback(StorageEngine&): remote_http_download branch
  - download_callback(StorageEngine&): broker download branch
  - download_callback(CloudStorageEngine&): cloud download branch
  - move_dir_callback(StorageEngine&): local move branch
…t overwrite

### What problem does this PR solve?

Issue Number: None

Related PR: None

Problem Summary: Work around the bucket-endpoint OSS Hive insert overwrite regression case by enabling standard URI parsing for that overwrite catalog configuration, so the case avoids the current FE cleanup failure on mixed-style OSS URIs.

### Release note

None

### Check List (For Author)

- Test: Manual test
    - Manual SQL verification on 172.20.58.11 FE: alter catalog property and rerun the failing insert overwrite successfully
- Behavior changed: No
- Does this need documentation: No
…xecInstanceNum() returns

a known value, regardless of fuzzy mode randomization or BE core count in test_hive_compress_type_large_data.
apache#61832) (apache#62319)

bp apache#61832
### What problem does this PR solve?
Problem Summary:
pick apache#61832 again, since apache#62119 reverted the changes made to apache#61847.

### Release note

None

### Check List (For Author)

- Test <!-- At least one of them must be included. -->
    - [ ] 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:
apache/doris-website#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 -->

### What problem does this PR solve?

Issue Number: close #xxx

Related PR: #xxx

Problem Summary:

### Release note

None

### Check List (For Author)

- Test <!-- At least one of them must be included. -->
    - [ ] 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:
apache/doris-website#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 -->
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.

9 participants