berkaysynnada opened a new issue, #14510: URL: https://github.com/apache/datafusion/issues/14510
### Is your feature request related to a problem or challenge? When executing long-running batch processes or streaming queries, it is difficult to diagnose and monitor memory usage. People need an easy way to inspect memory consumption to understand resource usage and troubleshoot potential OOM. issues. ### Describe the solution you'd like Implement a built-in memory profiling feature (similar to DuckDB’s duckdb_memory() and duckdb_temporary_files() functions) ``` ┌──────────────────┬────────────────────┬─────────────────────────┐ │ tag │ memory_usage_bytes │ temporary_storage_bytes │ │ varchar │ int64 │ int64 │ ├──────────────────┼────────────────────┼─────────────────────────┤ │ BASE_TABLE │ 168558592 │ 0 │ │ HASH_TABLE │ 0 │ 0 │ │ PARQUET_READER │ 0 │ 0 │ │ CSV_READER │ 0 │ 0 │ │ ORDER_BY │ 0 │ 0 │ │ ART_INDEX │ 0 │ 0 │ │ COLUMN_DATA │ 0 │ 0 │ │ METADATA │ 0 │ 0 │ │ OVERFLOW_STRINGS │ 0 │ 0 │ │ IN_MEMORY_TABLE │ 0 │ 0 │ │ ALLOCATOR │ 0 │ 0 │ │ EXTENSION │ 0 │ 0 │ ├──────────────────┴────────────────────┴─────────────────────────┤ │ 12 rows 3 columns │ └─────────────────────────────────────────────────────────────────┘ FROM duckdb_temporary_files(); ┌────────────────────────────────┬───────────┐ │ path │ size │ │ varchar │ int64 │ ├────────────────────────────────┼───────────┤ │ .tmp/duckdb_temp_storage-0.tmp │ 967049216 │ └────────────────────────────────┴───────────┘ ``` that allows to query: * The memory usage of different streams or even other objects (e.g., hash tables, intermediate results, buffers). * Current temporary file usage, if applicable. ### Describe alternatives you've considered _No response_ ### Additional context _No response_ -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org