An open-source, cloud-native, unified time series database for metrics, logs and events with SQL/PromQL supported. Available on GreptimeCloud.
4.19k
stars
299
forks
source link
Push down analyze verbose to region #4408
Open
evenyag opened 1 month ago
What type of enhancement is this?
User experience
What does the enhancement do?
explan verbose analyze
can't push down theverbose
flagImplementation challenges
The output of
explain analyze
is collected by theDistAnalyzeExec
. https://github.com/GreptimeTeam/greptimedb/blob/2ae2a6674e8a780cb93723de9b749b65ea28562e/src/query/src/analyze.rs#L134-L142https://github.com/GreptimeTeam/greptimedb/blob/2ae2a6674e8a780cb93723de9b749b65ea28562e/src/query/src/analyze.rs#L203-L222
The
MergeScanExec
will collect metrics from each region's output stream https://github.com/GreptimeTeam/greptimedb/blob/2ae2a6674e8a780cb93723de9b749b65ea28562e/src/query/src/dist_plan/merge_scan.rs#L260-L274The metric of a stream will use
one_line()
to format the plan, which always uses thedefault
level. https://github.com/GreptimeTeam/greptimedb/blob/2ae2a6674e8a780cb93723de9b749b65ea28562e/src/common/recordbatch/src/adapter.rs#L302-L311We have to find a way to push down the
verbose
level. Then we can use the indent() method to display the plan