Skip to content

feat: Add comprehensive metrics tracking to CSV reader#22900

Open
sp-202 wants to merge 1 commit into
apache:mainfrom
sp-202:main
Open

feat: Add comprehensive metrics tracking to CSV reader#22900
sp-202 wants to merge 1 commit into
apache:mainfrom
sp-202:main

Conversation

@sp-202

@sp-202 sp-202 commented Jun 11, 2026

Copy link
Copy Markdown

This PR enhances observability of CSV file reading operations by adding comprehensive metrics collection. These metrics enable better performance monitoring and debugging of CSV datasource operations during query execution, helping identify bottlenecks and optimize I/O operations.

What changes are included in this PR?

  • Implement as_any() method on CsvSource for dynamic casting support
  • Add bytes scanned counter to track the amount of data fetched from the object store for each partition
  • Record output metrics (row count) for file-based CSV reading path (non-wasm32)
  • Record output metrics (row count) for stream-based CSV reading path
  • These metrics integrate with the existing baseline metrics infrastructure

Add metrics collection for CSV file reading operations:
- Implement  method on CsvSource for dynamic casting
- Track bytes scanned when fetching file data
- Record output metrics (row count) for both file and stream-based CSV reading paths

These metrics improve observability and enable better performance monitoring
of CSV datasource operations during query execution.
@github-actions github-actions Bot added the datasource Changes to the datasource crate label Jun 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

datasource Changes to the datasource crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant