Skip to content

[CORE] optimize driver heap memory by lazily store metadata columns and fix mismatch result when input_file_name is only in filter condition#11899

Merged
taiyang-li merged 3 commits into
apache:mainfrom
taiyang-li:avoid_driver_oom
Jul 8, 2026
Merged

[CORE] optimize driver heap memory by lazily store metadata columns and fix mismatch result when input_file_name is only in filter condition#11899
taiyang-li merged 3 commits into
apache:mainfrom
taiyang-li:avoid_driver_oom

Conversation

@taiyang-li

@taiyang-li taiyang-li commented Apr 9, 2026

Copy link
Copy Markdown
Contributor

What changes are proposed in this pull request?

When scanning tens of millions of files, the driver may run out of heap memory during split construction.

Currently we always generate per-file metadata maps (InputFileName / InputFileBlockStart / InputFileBlockLength) for each split, even if the query does not reference these metadata columns. This causes a large number of HashMap instances to be kept in memory and may trigger OOM in the planner.

How was this patch tested?

New ut.

Was this patch authored or co-authored using generative AI tooling?

Generated-by: trae

@taiyang-li taiyang-li changed the title [Core] Avoid driver oom caused by unnecessary metadata columns in huge number of splitinfos [CORE] Avoid driver oom caused by unnecessary metadata columns in huge number of splitinfos Apr 9, 2026
@github-actions github-actions Bot added CORE works for Gluten Core VELOX CLICKHOUSE labels Apr 9, 2026
@github-actions

github-actions Bot commented Apr 9, 2026

Copy link
Copy Markdown

Run Gluten Clickhouse CI on x86

@taiyang-li

Copy link
Copy Markdown
Contributor Author

@baibaichen @rui-mo could you help review this pr, thanks!

@github-actions

Copy link
Copy Markdown

This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days.

@github-actions github-actions Bot added the stale stale label May 30, 2026
@github-actions

Copy link
Copy Markdown

This PR was auto-closed because it has been stalled for 10 days with no activity. Please feel free to reopen if it is still valid. Thanks.

@github-actions github-actions Bot closed this Jun 10, 2026
@taiyang-li taiyang-li reopened this Jun 10, 2026
@github-actions

Copy link
Copy Markdown

Run Gluten Clickhouse CI on x86

@github-actions github-actions Bot removed the stale stale label Jun 11, 2026
@zzcclp

zzcclp commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

any process about this pr @taiyang-li

@taiyang-li

Copy link
Copy Markdown
Contributor Author

@zzcclp I've been a bit busy lately and don't have the energy to read this PR for now. I'll check it out when I have idle time

@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown

Run Gluten Clickhouse CI on x86

1 similar comment
@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown

Run Gluten Clickhouse CI on x86

@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown

Run Gluten Clickhouse CI on x86

@taiyang-li taiyang-li changed the title [CORE] Avoid driver oom caused by unnecessary metadata columns in huge number of splitinfos [CORE] optimize driver oom by lazily store metadata columns Jul 8, 2026
@taiyang-li taiyang-li changed the title [CORE] optimize driver oom by lazily store metadata columns [CORE] optimize driver oom by lazily store metadata columns and fix mismatch result when input_file_name is only in filter condition Jul 8, 2026
@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown

Run Gluten Clickhouse CI on x86

@zzcclp zzcclp left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@taiyang-li taiyang-li changed the title [CORE] optimize driver oom by lazily store metadata columns and fix mismatch result when input_file_name is only in filter condition [CORE] optimize driver heap memory by lazily store metadata columns and fix mismatch result when input_file_name is only in filter condition Jul 8, 2026
@taiyang-li taiyang-li merged commit 630d5ac into apache:main Jul 8, 2026
60 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLICKHOUSE CORE works for Gluten Core VELOX

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants