Skip to content

chore: add code about hack and debug#9

Merged
fengys1996 merged 1 commit into
feat/nested-projection-support-epicfrom
chore/add-hack-debug
Apr 8, 2026
Merged

chore: add code about hack and debug#9
fengys1996 merged 1 commit into
feat/nested-projection-support-epicfrom
chore/add-hack-debug

Conversation

@fengys1996

Copy link
Copy Markdown
Owner

I hereby agree to the terms of the GreptimeDB CLA

What's changed and what's your intention?

PLEASE DO NOT LEAVE THIS EMPTY !!!

Please explain IN DETAIL what the changes are in this PR and why they are needed:

  • Summarize your change (mandatory)
  • How does this PR work? Need a brief introduction for the changed logic (optional)
  • Describe clearly one logical change and avoid lazy messages (optional)
  • Describe any limitations of the current code (optional)

Checklist

  • I have written the necessary rustdoc comments.
  • I have added the necessary unit tests and integration tests.

Refer to a related PR or issue link (optional)

@fengys1996
fengys1996 merged commit 58dc382 into feat/nested-projection-support-epic Apr 8, 2026
20 checks passed
@fengys1996
fengys1996 deleted the chore/add-hack-debug branch April 8, 2026 03:49

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a17e49a6d3

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/mito2/src/engine.rs
fn scan_region(&self, region_id: RegionId, request: ScanRequest) -> Result<ScanRegion> {
fn scan_region(&self, region_id: RegionId, mut request: ScanRequest) -> Result<ScanRegion> {
let query_start = Instant::now();
Self::hack_scan_req(&mut request);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Avoid overriding scan projection from global env hook

Calling hack_scan_req on every scan_region mutates request.projection_input for all scans whenever GREPTIME_PROJECTION_NESTED_PATHS is present, so one debug env setting can silently replace the planner-provided projection for unrelated queries. In that mode, the engine can return a different column set/schema than the query planned for, which can produce incorrect results or runtime schema-mismatch failures; this should be gated to explicit debug builds/paths instead of the default scan path.

Useful? React with 👍 / 👎.

let parquet_read_cols = read_format.parquet_read_columns();
let leaf_indices = build_parquet_leaves_indices(parquet_schema_desc, &parquet_read_cols);
// TODO(fys): remove it later.
common_telemetry::info!("leaf_indices: {:?}", leaf_indices);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Remove info-level leaf index dump in hot read path

This adds an unconditional info! log for leaf_indices during parquet reader construction, which runs for normal scans and compactions; on wide schemas and many files this emits large per-file logs and adds avoidable CPU/I/O overhead in production. Because this is debug-only data, it should be removed or downgraded behind a debug/trace guard.

Useful? React with 👍 / 👎.

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.

1 participant