Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: dist sql analyze #1260

Merged
merged 20 commits into from
Dec 28, 2023
Merged

feat: dist sql analyze #1260

merged 20 commits into from
Dec 28, 2023

Conversation

baojinri
Copy link
Contributor

@baojinri baojinri commented Oct 13, 2023

Rationale

Currently, the analyze sql can not obtain detail metrics of partitioned table,

Detailed Changes

  • return metrics of partitioned table to remote client
  • collect metrics in client

Test Plan

  • Existing tests
  • add new integration tests for explain analyze

@baojinri baojinri marked this pull request as ready for review October 30, 2023 12:59
@Rachelint
Copy link
Contributor

Rachelint commented Nov 2, 2023

{
    "rows": [
        {
            "plan_type": "Plan with Metrics",
            "plan": "SortPreservingMergeExec: [minute@0 ASC NULLS LAST], metrics=[output_rows=6, elapsed_compute=46.541µs]
              SortExec: expr=[minute@0 ASC NULLS LAST], metrics=[output_rows=6, elapsed_compute=8ns, spill_count=0, spilled_bytes=0]
                ProjectionExec: expr=[time_bucket(cpu.timestamp,Utf8(\"PT60S\"))@0 as minute, MAX(cpu.usage_user)@1 as max_usage_user, MAX(cpu.usage_system)@2 as max_usage_system, MAX(cpu.usage_idle)@3 as max_usage_idle, MAX(cpu.usage_nice)@4 as max_usage_nice, MAX(cpu.usage_iowait)@5 as max_usage_iowait], metrics=[output_rows=6, elapsed_compute=35.333µs]
                  AggregateExec: mode=FinalPartitioned, gby=[time_bucket(cpu.timestamp,Utf8(\"PT60S\"))@0 as time_bucket(cpu.timestamp,Utf8(\"PT60S\"))], aggr=[MAX(cpu.usage_user), MAX(cpu.usage_system), MAX(cpu.usage_idle), MAX(cpu.usage_nice), MAX(cpu.usage_iowait)], metrics=[output_rows=6, elapsed_compute=479.835µs]
                    CoalesceBatchesExec: target_batch_size=8192, metrics=[output_rows=30, elapsed_compute=465.171µs]
                      RepartitionExec: partitioning=Hash([time_bucket(cpu.timestamp,Utf8(\"PT60S\"))@0], 8), input_partitions=3, metrics=[fetch_time=75.390247ms, repart_time=739.455µs, send_time=110.544µs]
                        ResolvedPartitionedScan: pushdown_continue:false, partition_count:3, metrics=[
                        cpu:
                __cpu_1:
                    poll_duration=1.2155ms
                    total_duration=24.775958ms
                    wait_duration=23.560458ms
                    CoalescePartitionsExec, metrics=[output_rows=12, elapsed_compute=27.292µs]
              AggregateExec: mode=Partial, gby=[time_bucket(timestamp@0, PT60S) as time_bucket(cpu.timestamp,Utf8(\"PT60S\"))], aggr=[MAX(cpu.usage_user), MAX(cpu.usage_system), MAX(cpu.usage_idle), MAX(cpu.usage_nice), MAX(cpu.usage_iowait)], metrics=[output_rows=12, elapsed_compute=555.584µs]
                RepartitionExec: partitioning=RoundRobinBatch(8), input_partitions=8, metrics=[fetch_time=16.261959ms, repart_time=8ns, send_time=29.715µs]
                  ProjectionExec: expr=[timestamp@0 as timestamp, usage_user@2 as usage_user, usage_system@3 as usage_system, usage_idle@4 as usage_idle, usage_nice@5 as usage_nice, usage_iowait@6 as usage_iowait], metrics=[output_rows=24, elapsed_compute=15.257µs]
                    ScanTable: table=__cpu_1, parallelism=8, metrics=[
                    :
                do_merge_sort=false
                chain_iter_0:
                    num_memtables=0
                    num_ssts=1
                    scan_duration=16.032959ms
                    since_create=16.576375ms
                    since_init=16.162834ms
                    total_batch_fetched=2
                    total_rows_fetched=24
                    scan_sst_1:
                        meta_data_cache_hit=true
                        parallelism=2
                        project_record_batch=17.160417ms
                        read_meta_data_duration=34.625µs
                        row_mem=1214000
                        row_num=14820
                        prune_row_groups:
                            pruned_by_custom_filter=0
                            pruned_by_min_max=0
                            row_groups_after_prune=2
                            total_row_groups=2
                            use_custom_filter=false
                            Predicate { exprs:[hostname IN ([Utf8(\"host_249\"), Utf8(\"host_1403\"), Utf8(\"host_1435\"), Utf8(\"host_3539\"), Utf8(\"host_3639\"), Utf8(\"host_3075\"), Utf8(\"host_815\"), Utf8(\"host_2121\")]), timestamp >= TimestampMillisecond(1662336000000, None), timestamp < TimestampMillisecond(1662339600000, None)], time_range:TimeRange { inclusive_start: Timestamp(1662336000000), exclusive_end: Timestamp(1662339600000) } }=0]
            :
                __cpu_3:
                    poll_duration=1.256419ms
                    total_duration=24.915875ms
                    wait_duration=23.659456ms
                    CoalescePartitionsExec, metrics=[output_rows=6, elapsed_compute=26.208µs]
              AggregateExec: mode=Partial, gby=[time_bucket(timestamp@0, PT60S) as time_bucket(cpu.timestamp,Utf8(\"PT60S\"))], aggr=[MAX(cpu.usage_user), MAX(cpu.usage_system), MAX(cpu.usage_idle), MAX(cpu.usage_nice), MAX(cpu.usage_iowait)], metrics=[output_rows=6, elapsed_compute=376.956µs]
                RepartitionExec: partitioning=RoundRobinBatch(8), input_partitions=8, metrics=[send_time=18.924µs, fetch_time=16.109503ms, repart_time=8ns]
                  ProjectionExec: expr=[timestamp@0 as timestamp, usage_user@2 as usage_user, usage_system@3 as usage_system, usage_idle@4 as usage_idle, usage_nice@5 as usage_nice, usage_iowait@6 as usage_iowait], metrics=[output_rows=6, elapsed_compute=9.423µs]
                    ScanTable: table=__cpu_3, parallelism=8, metrics=[
                    :
                do_merge_sort=false
                chain_iter_0:
                    num_memtables=0
                    num_ssts=1
                    scan_duration=15.926334ms
                    since_create=16.707083ms
                    since_init=16.000458ms
                    total_batch_fetched=1
                    total_rows_fetched=6
                    scan_sst_1:
                        meta_data_cache_hit=true
                        parallelism=2
                        project_record_batch=17.393667ms
                        read_meta_data_duration=3µs
                        row_mem=1214000
                        row_num=15042
                        prune_row_groups:
                            pruned_by_custom_filter=0
                            pruned_by_min_max=0
                            row_groups_after_prune=2
                            total_row_groups=2
                            use_custom_filter=false
                            Predicate { exprs:[hostname IN ([Utf8(\"host_249\"), Utf8(\"host_1403\"), Utf8(\"host_1435\"), Utf8(\"host_3539\"), Utf8(\"host_3639\"), Utf8(\"host_3075\"), Utf8(\"host_815\"), Utf8(\"host_2121\")]), timestamp >= TimestampMillisecond(1662336000000, None), timestamp < TimestampMillisecond(1662339600000, None)], time_range:TimeRange { inclusive_start: Timestamp(1662336000000), exclusive_end: Timestamp(1662339600000) } }=0]
            :
                __cpu_0:
                    poll_duration=1.163751ms
                    total_duration=24.882833ms
                    wait_duration=23.719082ms
                    CoalescePartitionsExec, metrics=[output_rows=12, elapsed_compute=30.333µs]
              AggregateExec: mode=Partial, gby=[time_bucket(timestamp@0, PT60S) as time_bucket(cpu.timestamp,Utf8(\"PT60S\"))], aggr=[MAX(cpu.usage_user), MAX(cpu.usage_system), MAX(cpu.usage_idle), MAX(cpu.usage_nice), MAX(cpu.usage_iowait)], metrics=[output_rows=12, elapsed_compute=658.501µs]
                RepartitionExec: partitioning=RoundRobinBatch(8), input_partitions=8, metrics=[send_time=26.465µs, fetch_time=16.535752ms, repart_time=8ns]
                  ProjectionExec: expr=[timestamp@0 as timestamp, usage_user@2 as usage_user, usage_system@3 as usage_system, usage_idle@4 as usage_idle, usage_nice@5 as usage_nice, usage_iowait@6 as usage_iowait], metrics=[output_rows=18, elapsed_compute=15.049µs]
                    ScanTable: table=__cpu_0, parallelism=8, metrics=[
                    :
                do_merge_sort=false
                chain_iter_0:
                    num_memtables=0
                    num_ssts=1
                    scan_duration=16.21ms
                    since_create=16.875791ms
                    since_init=16.325417ms
                    total_batch_fetched=2
                    total_rows_fetched=18
                    scan_sst_1:
                        meta_data_cache_hit=true
                        parallelism=2
                        project_record_batch=18.508416ms
                        read_meta_data_duration=40.583µs
                        row_mem=1214000
                        row_num=15228
                        prune_row_groups:
                            pruned_by_custom_filter=0
                            pruned_by_min_max=0
                            row_groups_after_prune=2
                            total_row_groups=2
                            use_custom_filter=false
                            Predicate { exprs:[hostname IN ([Utf8(\"host_249\"), Utf8(\"host_1403\"), Utf8(\"host_1435\"), Utf8(\"host_3539\"), Utf8(\"host_3639\"), Utf8(\"host_3075\"), Utf8(\"host_815\"), Utf8(\"host_2121\")]), timestamp >= TimestampMillisecond(1662336000000, None), timestamp < TimestampMillisecond(1662339600000, None)], time_range:TimeRange { inclusive_start: Timestamp(1662336000000), exclusive_end: Timestamp(1662339600000) } }=0]
            :
            =0]
                          AggregateExec: mode=Partial, gby=[time_bucket(timestamp@0, PT60S) as time_bucket(cpu.timestamp,Utf8(\"PT60S\"))], aggr=[MAX(cpu.usage_user), MAX(cpu.usage_system), MAX(cpu.usage_idle), MAX(cpu.usage_nice), MAX(cpu.usage_iowait)], metrics=[]
                            RepartitionExec: partitioning=RoundRobinBatch(8), input_partitions=8, metrics=[]
                              ProjectionExec: expr=[timestamp@0 as timestamp, usage_user@2 as usage_user, usage_system@3 as usage_system, usage_idle@4 as usage_idle, usage_nice@5 as usage_nice, usage_iowait@6 as usage_iowait], metrics=[]
                                UnresolvedSubTableScan: table:TableIdentifier { catalog: \"ceresdb\", schema: \"public\", table: \"__cpu_1\" }, table_scan_ctx:TableScanContext { read_parallelism: 8, batch_size: 8192, projection: Some([1, 2, 12, 13, 14, 15, 16]), predicate: Predicate { exprs:[hostname IN ([Utf8(\"host_249\"), Utf8(\"host_1403\"), Utf8(\"host_1435\"), Utf8(\"host_3539\"), Utf8(\"host_3639\"), Utf8(\"host_3075\"), Utf8(\"host_815\"), Utf8(\"host_2121\")]), timestamp >= TimestampMillisecond(1662336000000, None), timestamp < TimestampMillisecond(1662339600000, None)], time_range:TimeRange { inclusive_start: Timestamp(1662336000000), exclusive_end: Timestamp(1662339600000) } } }, partition_count:8, metrics=[]
                          AggregateExec: mode=Partial, gby=[time_bucket(timestamp@0, PT60S) as time_bucket(cpu.timestamp,Utf8(\"PT60S\"))], aggr=[MAX(cpu.usage_user), MAX(cpu.usage_system), MAX(cpu.usage_idle), MAX(cpu.usage_nice), MAX(cpu.usage_iowait)], metrics=[]
                            RepartitionExec: partitioning=RoundRobinBatch(8), input_partitions=8, metrics=[]
                              ProjectionExec: expr=[timestamp@0 as timestamp, usage_user@2 as usage_user, usage_system@3 as usage_system, usage_idle@4 as usage_idle, usage_nice@5 as usage_nice, usage_iowait@6 as usage_iowait], metrics=[]
                                UnresolvedSubTableScan: table:TableIdentifier { catalog: \"ceresdb\", schema: \"public\", table: \"__cpu_3\" }, table_scan_ctx:TableScanContext { read_parallelism: 8, batch_size: 8192, projection: Some([1, 2, 12, 13, 14, 15, 16]), predicate: Predicate { exprs:[hostname IN ([Utf8(\"host_249\"), Utf8(\"host_1403\"), Utf8(\"host_1435\"), Utf8(\"host_3539\"), Utf8(\"host_3639\"), Utf8(\"host_3075\"), Utf8(\"host_815\"), Utf8(\"host_2121\")]), timestamp >= TimestampMillisecond(1662336000000, None), timestamp < TimestampMillisecond(1662339600000, None)], time_range:TimeRange { inclusive_start: Timestamp(1662336000000), exclusive_end: Timestamp(1662339600000) } } }, partition_count:8, metrics=[]
                          AggregateExec: mode=Partial, gby=[time_bucket(timestamp@0, PT60S) as time_bucket(cpu.timestamp,Utf8(\"PT60S\"))], aggr=[MAX(cpu.usage_user), MAX(cpu.usage_system), MAX(cpu.usage_idle), MAX(cpu.usage_nice), MAX(cpu.usage_iowait)], metrics=[]
                            RepartitionExec: partitioning=RoundRobinBatch(8), input_partitions=8, metrics=[]
                              ProjectionExec: expr=[timestamp@0 as timestamp, usage_user@2 as usage_user, usage_system@3 as usage_system, usage_idle@4 as usage_idle, usage_nice@5 as usage_nice, usage_iowait@6 as usage_iowait], metrics=[]
                                UnresolvedSubTableScan: table:TableIdentifier { catalog: \"ceresdb\", schema: \"public\", table: \"__cpu_0\" }, table_scan_ctx:TableScanContext { read_parallelism: 8, batch_size: 8192, projection: Some([1, 2, 12, 13, 14, 15, 16]), predicate: Predicate { exprs:[hostname IN ([Utf8(\"host_249\"), Utf8(\"host_1403\"), Utf8(\"host_1435\"), Utf8(\"host_3539\"), Utf8(\"host_3639\"), Utf8(\"host_3075\"), Utf8(\"host_815\"), Utf8(\"host_2121\")]), timestamp >= TimestampMillisecond(1662336000000, None), timestamp < TimestampMillisecond(1662339600000, None)], time_range:TimeRange { inclusive_start: Timestamp(1662336000000), exclusive_end: Timestamp(1662339600000) } } }, partition_count:8, metrics=[]
                                "
        }
    ]
}

Above is the result I get in local test, do you notice the empty metric sub plans still exist? You can't just finish the feature in some hack ways, which will make codes not maintainable, and should think about how to impl it following the datafusion metrics framework.

AggregateExec: mode=Partial, gby=[time_bucket(timestamp@0, PT60S) as time_bucket(cpu.timestamp,Utf8(\"PT60S\"))], aggr=[MAX(cpu.usage_user), MAX(cpu.usage_system), MAX(cpu.usage_idle), MAX(cpu.usage_nice), MAX(cpu.usage_iowait)], metrics=[]

server/src/grpc/remote_engine_service/mod.rs Outdated Show resolved Hide resolved
server/src/grpc/remote_engine_service/mod.rs Outdated Show resolved Hide resolved
remote_engine_client/src/client.rs Outdated Show resolved Hide resolved
query_engine/src/datafusion_impl/task_context.rs Outdated Show resolved Hide resolved
query_engine/src/physical_planner.rs Outdated Show resolved Hide resolved
remote_engine_client/src/client.rs Outdated Show resolved Hide resolved
remote_engine_client/src/client.rs Outdated Show resolved Hide resolved
remote_engine_client/src/client.rs Show resolved Hide resolved
server/src/grpc/remote_engine_service/mod.rs Outdated Show resolved Hide resolved
@ShiKaiWi
Copy link
Member

@baojinri Could you provide an example of the analysis result?

@baojinri
Copy link
Contributor Author

Example result:

SortPreservingMergeExec: [minute@0 ASC NULLS LAST], metrics=[output_rows=6, elapsed_compute=94.084µs]
  SortExec: expr=[minute@0 ASC NULLS LAST], metrics=[output_rows=6, elapsed_compute=8ns, spill_count=0, spilled_bytes=0]
    ProjectionExec: expr=[time_bucket(cpu.timestamp,Utf8("PT60S"))@0 as minute, MAX(cpu.usage_user)@1 as max_usage_user, MAX(cpu.usage_system)@2 as max_usage_system, MAX(cpu.usage_idle)@3 as max_usage_idle, MAX(cpu.usage_nice)@4 as max_usage_nice, MAX(cpu.usage_iowait)@5 as max_usage_iowait], metrics=[output_rows=6, elapsed_compute=30.916µs]
      AggregateExec: mode=FinalPartitioned, gby=[time_bucket(cpu.timestamp,Utf8("PT60S"))@0 as time_bucket(cpu.timestamp,Utf8("PT60S"))], aggr=[MAX(cpu.usage_user), MAX(cpu.usage_system), MAX(cpu.usage_idle), MAX(cpu.usage_nice), MAX(cpu.usage_iowait)], metrics=[output_rows=6, elapsed_compute=1.475875ms]
        CoalesceBatchesExec: target_batch_size=8192, metrics=[output_rows=30, elapsed_compute=432.305µs]
          RepartitionExec: partitioning=Hash([time_bucket(cpu.timestamp,Utf8("PT60S"))@0], 8), input_partitions=3, metrics=[repart_time=961.753µs, fetch_time=128.515041ms, send_time=69µs]
            ResolvedPartitionedScan: pushdown_continue:false, partition_count:3, metrics=[
cpu:
    __cpu_3:
        CoalescePartitionsExec, metrics=[output_rows=6, elapsed_compute=17.875µs]
  AggregateExec: mode=Partial, gby=[time_bucket(timestamp@0, PT60S) as time_bucket(cpu.timestamp,Utf8("PT60S"))], aggr=[MAX(cpu.usage_user), MAX(cpu.usage_system), MAX(cpu.usage_idle), MAX(cpu.usage_nice), MAX(cpu.usage_iowait)], metrics=[output_rows=6, elapsed_compute=471.709µs]
    RepartitionExec: partitioning=RoundRobinBatch(8), input_partitions=8, metrics=[send_time=7.799µs, repart_time=8ns, fetch_time=31.4ms]
      ProjectionExec: expr=[timestamp@0 as timestamp, usage_user@2 as usage_user, usage_system@3 as usage_system, usage_idle@4 as usage_idle, usage_nice@5 as usage_nice, usage_iowait@6 as usage_iowait], metrics=[output_rows=6, elapsed_compute=6.09µs]
        ScanTable: table=__cpu_3, parallelism=8, metrics=[
:
    do_merge_sort=false
    chain_iter_0:
        num_memtables=0
        num_ssts=1
        scan_duration=31.235834ms
        since_create=32.0695ms
        since_init=31.279791ms
        total_batch_fetched=1
        total_rows_fetched=6
        scan_sst_1:
            meta_data_cache_hit=true
            parallelism=2
            project_record_batch=51.54025ms
            read_meta_data_duration=72.792µs
            row_mem=1214000
            row_num=15042
            prune_row_groups:
                pruned_by_custom_filter=0
                pruned_by_min_max=0
                row_groups_after_prune=2
                total_row_groups=2
                use_custom_filter=false


Predicate { exprs:[hostname IN ([Utf8("host_249"), Utf8("host_1403"), Utf8("host_1435"), Utf8("host_3539"), Utf8("host_3639"), Utf8("host_3075"), Utf8("host_815"), Utf8("host_2121")]), timestamp >= TimestampMillisecond(1662336000000, None), timestamp < TimestampMillisecond(1662339600000, None)], time_range:TimeRange { inclusive_start: Timestamp(1662336000000), exclusive_end: Timestamp(1662339600000) } }=0]
=0
        poll_duration=1.374958ms
        total_duration=41.677834ms
        wait_duration=40.302876ms
    __cpu_0:
        CoalescePartitionsExec, metrics=[output_rows=12, elapsed_compute=27.25µs]
  AggregateExec: mode=Partial, gby=[time_bucket(timestamp@0, PT60S) as time_bucket(cpu.timestamp,Utf8("PT60S"))], aggr=[MAX(cpu.usage_user), MAX(cpu.usage_system), MAX(cpu.usage_idle), MAX(cpu.usage_nice), MAX(cpu.usage_iowait)], metrics=[output_rows=12, elapsed_compute=1.276168ms]
    RepartitionExec: partitioning=RoundRobinBatch(8), input_partitions=8, metrics=[repart_time=8ns, fetch_time=32.165252ms, send_time=14.132µs]
      ProjectionExec: expr=[timestamp@0 as timestamp, usage_user@2 as usage_user, usage_system@3 as usage_system, usage_idle@4 as usage_idle, usage_nice@5 as usage_nice, usage_iowait@6 as usage_iowait], metrics=[output_rows=18, elapsed_compute=7.257µs]
        ScanTable: table=__cpu_0, parallelism=8, metrics=[
:
    do_merge_sort=false
    chain_iter_0:
        num_memtables=0
        num_ssts=1
        scan_duration=32.040042ms
        since_create=32.657792ms
        since_init=32.101583ms
        total_batch_fetched=2
        total_rows_fetched=18
        scan_sst_1:
            meta_data_cache_hit=true
            parallelism=2
            project_record_batch=52.80775ms
            read_meta_data_duration=72µs
            row_mem=1214000
            row_num=15228
            prune_row_groups:
                pruned_by_custom_filter=0
                pruned_by_min_max=0
                row_groups_after_prune=2
                total_row_groups=2
                use_custom_filter=false


Predicate { exprs:[hostname IN ([Utf8("host_249"), Utf8("host_1403"), Utf8("host_1435"), Utf8("host_3539"), Utf8("host_3639"), Utf8("host_3075"), Utf8("host_815"), Utf8("host_2121")]), timestamp >= TimestampMillisecond(1662336000000, None), timestamp < TimestampMillisecond(1662339600000, None)], time_range:TimeRange { inclusive_start: Timestamp(1662336000000), exclusive_end: Timestamp(1662339600000) } }=0]
=0
        poll_duration=1.093877ms
        total_duration=42.014084ms
        wait_duration=40.920207ms
    __cpu_1:
        CoalescePartitionsExec, metrics=[output_rows=12, elapsed_compute=24.041µs]
  AggregateExec: mode=Partial, gby=[time_bucket(timestamp@0, PT60S) as time_bucket(cpu.timestamp,Utf8("PT60S"))], aggr=[MAX(cpu.usage_user), MAX(cpu.usage_system), MAX(cpu.usage_idle), MAX(cpu.usage_nice), MAX(cpu.usage_iowait)], metrics=[output_rows=12, elapsed_compute=1.471331ms]
    RepartitionExec: partitioning=RoundRobinBatch(8), input_partitions=8, metrics=[send_time=14.049µs, repart_time=8ns, fetch_time=29.984ms]
      ProjectionExec: expr=[timestamp@0 as timestamp, usage_user@2 as usage_user, usage_system@3 as usage_system, usage_idle@4 as usage_idle, usage_nice@5 as usage_nice, usage_iowait@6 as usage_iowait], metrics=[output_rows=24, elapsed_compute=11.84µs]
        ScanTable: table=__cpu_1, parallelism=8, metrics=[
:
    do_merge_sort=false
    chain_iter_0:
        num_memtables=0
        num_ssts=1
        scan_duration=29.849834ms
        since_create=30.8535ms
        since_init=29.925167ms
        total_batch_fetched=2
        total_rows_fetched=24
        scan_sst_1:
            meta_data_cache_hit=true
            parallelism=2
            project_record_batch=53.268082ms
            read_meta_data_duration=68.833µs
            row_mem=1214000
            row_num=14820
            prune_row_groups:
                pruned_by_custom_filter=0
                pruned_by_min_max=0
                row_groups_after_prune=2
                total_row_groups=2
                use_custom_filter=false


Predicate { exprs:[hostname IN ([Utf8("host_249"), Utf8("host_1403"), Utf8("host_1435"), Utf8("host_3539"), Utf8("host_3639"), Utf8("host_3075"), Utf8("host_815"), Utf8("host_2121")]), timestamp >= TimestampMillisecond(1662336000000, None), timestamp < TimestampMillisecond(1662339600000, None)], time_range:TimeRange { inclusive_start: Timestamp(1662336000000), exclusive_end: Timestamp(1662339600000) } }=0]
=0
        poll_duration=1.135876ms
        total_duration=40.919792ms
        wait_duration=39.783916ms
=0]

df_engine_extensions/src/dist_sql_query/resolver.rs Outdated Show resolved Hide resolved
df_engine_extensions/src/dist_sql_query/resolver.rs Outdated Show resolved Hide resolved
df_engine_extensions/src/dist_sql_query/resolver.rs Outdated Show resolved Hide resolved
server/src/grpc/remote_engine_service/mod.rs Outdated Show resolved Hide resolved
server/src/grpc/remote_engine_service/mod.rs Outdated Show resolved Hide resolved
components/trace_metric/src/collector.rs Outdated Show resolved Hide resolved
query_engine/src/datafusion_impl/task_context.rs Outdated Show resolved Hide resolved
df_engine_extensions/src/dist_sql_query/resolver.rs Outdated Show resolved Hide resolved
df_engine_extensions/src/dist_sql_query/physical_plan.rs Outdated Show resolved Hide resolved
@baojinri baojinri changed the base branch from main to dev December 5, 2023 11:38
@baojinri baojinri force-pushed the feat-dist-sql-analyze branch 2 times, most recently from 726686d to 99954b9 Compare December 5, 2023 12:04
df_engine_extensions/src/dist_sql_query/mod.rs Outdated Show resolved Hide resolved
df_engine_extensions/src/dist_sql_query/mod.rs Outdated Show resolved Hide resolved
df_engine_extensions/src/dist_sql_query/physical_plan.rs Outdated Show resolved Hide resolved
df_engine_extensions/src/dist_sql_query/physical_plan.rs Outdated Show resolved Hide resolved
remote_engine_client/Cargo.toml Outdated Show resolved Hide resolved
server/src/grpc/remote_engine_service/mod.rs Outdated Show resolved Hide resolved
@Rachelint
Copy link
Contributor

Add an integration test case for it.

df_engine_extensions/src/dist_sql_query/physical_plan.rs Outdated Show resolved Hide resolved
Cargo.toml Outdated Show resolved Hide resolved
Copy link
Contributor

@Rachelint Rachelint left a comment

Choose a reason for hiding this comment

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

LGTM

@ShiKaiWi ShiKaiWi merged commit b02bac2 into apache:dev Dec 28, 2023
7 checks passed
jiacai2050 added a commit that referenced this pull request Jan 3, 2024
## Rationale
In #1260, we implemented distributed analyze, but for query that are not
analyze, metrics will be returned, which will lead to a decrease in
query performance. Therefore, we will fix it in this PR, and metrics
will not be returned for normal queries.

## Detailed Changes
- Add is_analyze field to determine whether it is analyze

## Test Plan
Existing tests

---------

Co-authored-by: jiacai2050 <dev@liujiacai.net>
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.

None yet

3 participants