generated from duckdb/extension-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Is your feature request related to a problem? Please describe.
duckdb-filesystem-observability/src/observefs_extension.cpp
Lines 39 to 53 in 4af6cec
| static void GetProfileStats(const DataChunk &args, ExpressionState &state, Vector &result) { | |
| string latest_stat; | |
| const auto &observefs_instances = ObservabilityFsRefRegistry::Get().GetAllObservabilityFs(); | |
| for (auto *cur_filesystem : observefs_instances) { | |
| latest_stat += StringUtil::Format("Current filesystem: %s\n", cur_filesystem->GetName()); | |
| const auto cur_stats_str = cur_filesystem->GetHumanReadableStats(); | |
| if (cur_stats_str.empty()) { | |
| latest_stat += "No interested IO operations issued."; | |
| } else { | |
| latest_stat += cur_stats_str; | |
| } | |
| latest_stat += "\n"; | |
| } | |
| result.Reference(Value(std::move(latest_stat))); | |
| } |
Current implementation is a scalar function, which exports everything into one cell;
a better approach is to export in table function.
Describe the solution you'd like
Refactor scalar function into table function.
Describe alternatives you've considered
N/A
Additional context
N/A
Metadata
Metadata
Assignees
Labels
No labels