{
    "Plan" : {
        "Plans" : [
            {
                "PlanNodeId" : 6,
                "Plans" : [
                    {
                        "PlanNodeId" : 5,
                        "Plans" : [
                            {
                                "PlanNodeId" : 4,
                                "Plans" : [
                                    {
                                        "PlanNodeId" : 3,
                                        "Plans" : [
                                            {
                                                "PlanNodeId" : 2,
                                                "Plans" : [
                                                    {
                                                        "Tables" : [
                                                            "olap_yatests/clickbench/hits"
                                                        ],
                                                        "PlanNodeId" : 1,
                                                        "Operators" : [
                                                            {
                                                                "Inputs" : [
                                                                    {
                                                                        "InternalOperatorId" : 1
                                                                    }
                                                                ],
                                                                "GroupBy" : "[0]",
                                                                "Aggregation" : "",
                                                                "Name" : "Aggregate",
                                                                "Phase" : "Intermediate"
                                                            },
                                                            {
                                                                "Inputs" : [
                                                                    {
                                                                        "InternalOperatorId" : 2
                                                                    }
                                                                ],
                                                                "E-Rows" : "350",
                                                                "Predicate" : "IsRefresh == 0 AND DontCountHits == 0 AND EventDate >= \"15900\" AND EventDate <= \"15901\"",
                                                                "Pushdown" : "True",
                                                                "Name" : "Filter",
                                                                "E-Size" : "8699.773714",
                                                                "E-Cost" : "0"
                                                            },
                                                            {
                                                                "Scan" : "Parallel",
                                                                "E-Size" : "3479909.486",
                                                                "ReadRanges" : [
                                                                    "CounterID [62, 62]"
                                                                ],
                                                                "Name" : "TableRangeScan",
                                                                "Inputs" : [ ],
                                                                "Path" : "/local/test_db/olap_yatests/clickbench/hits",
                                                                "E-Rows" : "140000",
                                                                "Table" : "olap_yatests/clickbench/hits",
                                                                "ReadRangesKeys" : [
                                                                    "CounterID"
                                                                ],
                                                                "ReadColumns" : [
                                                                    "DontCountHits",
                                                                    "EventDate",
                                                                    "EventTime",
                                                                    "IsRefresh"
                                                                ],
                                                                "SsaProgram" : {
                                                                    "Command" : [
                                                                        {
                                                                            "Assign" : {
                                                                                "Constant" : {
                                                                                    "Int32" : 0
                                                                                },
                                                                                "Column" : {
                                                                                    "Id" : 106
                                                                                }
                                                                            }
                                                                        },
                                                                        {
                                                                            "Assign" : {
                                                                                "Function" : {
                                                                                    "YqlOperationId" : 11,
                                                                                    "KernelIdx" : 0,
                                                                                    "FunctionType" : 2,
                                                                                    "Arguments" : [
                                                                                        {
                                                                                            "Id" : 16
                                                                                        },
                                                                                        {
                                                                                            "Id" : 106
                                                                                        }
                                                                                    ]
                                                                                },
                                                                                "Column" : {
                                                                                    "Id" : 107
                                                                                }
                                                                            }
                                                                        },
                                                                        {
                                                                            "Assign" : {
                                                                                "Constant" : {
                                                                                    "Int32" : 0
                                                                                },
                                                                                "Column" : {
                                                                                    "Id" : 108
                                                                                }
                                                                            }
                                                                        },
                                                                        {
                                                                            "Assign" : {
                                                                                "Function" : {
                                                                                    "YqlOperationId" : 11,
                                                                                    "KernelIdx" : 1,
                                                                                    "FunctionType" : 2,
                                                                                    "Arguments" : [
                                                                                        {
                                                                                            "Id" : 62
                                                                                        },
                                                                                        {
                                                                                            "Id" : 108
                                                                                        }
                                                                                    ]
                                                                                },
                                                                                "Column" : {
                                                                                    "Id" : 109
                                                                                }
                                                                            }
                                                                        },
                                                                        {
                                                                            "Assign" : {
                                                                                "Function" : {
                                                                                    "YqlOperationId" : 0,
                                                                                    "KernelIdx" : 2,
                                                                                    "FunctionType" : 2,
                                                                                    "Arguments" : [
                                                                                        {
                                                                                            "Id" : 107
                                                                                        },
                                                                                        {
                                                                                            "Id" : 109
                                                                                        }
                                                                                    ]
                                                                                },
                                                                                "Column" : {
                                                                                    "Id" : 110
                                                                                }
                                                                            }
                                                                        },
                                                                        {
                                                                            "Assign" : {
                                                                                "Function" : {
                                                                                    "KernelName" : "",
                                                                                    "KernelIdx" : 3,
                                                                                    "FunctionType" : 2,
                                                                                    "Arguments" : [
                                                                                        {
                                                                                            "Id" : 6
                                                                                        }
                                                                                    ]
                                                                                },
                                                                                "Column" : {
                                                                                    "Id" : 111
                                                                                }
                                                                            }
                                                                        },
                                                                        {
                                                                            "Assign" : {
                                                                                "Function" : {
                                                                                    "KernelName" : "",
                                                                                    "KernelIdx" : 4,
                                                                                    "FunctionType" : 2,
                                                                                    "Arguments" : [
                                                                                        {
                                                                                            "Id" : 6
                                                                                        }
                                                                                    ]
                                                                                },
                                                                                "Column" : {
                                                                                    "Id" : 112
                                                                                }
                                                                            }
                                                                        },
                                                                        {
                                                                            "Assign" : {
                                                                                "Function" : {
                                                                                    "YqlOperationId" : 0,
                                                                                    "KernelIdx" : 5,
                                                                                    "FunctionType" : 2,
                                                                                    "Arguments" : [
                                                                                        {
                                                                                            "Id" : 111
                                                                                        },
                                                                                        {
                                                                                            "Id" : 112
                                                                                        }
                                                                                    ]
                                                                                },
                                                                                "Column" : {
                                                                                    "Id" : 113
                                                                                }
                                                                            }
                                                                        },
                                                                        {
                                                                            "Assign" : {
                                                                                "Function" : {
                                                                                    "YqlOperationId" : 0,
                                                                                    "KernelIdx" : 6,
                                                                                    "FunctionType" : 2,
                                                                                    "Arguments" : [
                                                                                        {
                                                                                            "Id" : 110
                                                                                        },
                                                                                        {
                                                                                            "Id" : 113
                                                                                        }
                                                                                    ]
                                                                                },
                                                                                "Column" : {
                                                                                    "Id" : 114
                                                                                }
                                                                            }
                                                                        },
                                                                        {
                                                                            "Filter" : {
                                                                                "Predicate" : {
                                                                                    "Id" : 114
                                                                                }
                                                                            }
                                                                        },
                                                                        {
                                                                            "Projection" : {
                                                                                "Columns" : [
                                                                                    {
                                                                                        "Id" : 5
                                                                                    }
                                                                                ]
                                                                            }
                                                                        }
                                                                    ]
                                                                },
                                                                "E-Cost" : "0",
                                                                "ReadRangesExpectedSize" : 1
                                                            }
                                                        ],
                                                        "Node Type" : "Aggregate-Filter-TableRangeScan",
                                                        "Stats" : {
                                                            "UseLlvm" : "undefined",
                                                            "Output" : [
                                                                {
                                                                    "Pop" : { },
                                                                    "Name" : "3",
                                                                    "Push" : {
                                                                        "WaitTimeUs" : {
                                                                            "Count" : 3,
                                                                            "Sum" : 1732954,
                                                                            "Max" : 579999,
                                                                            "Min" : 573311,
                                                                            "History" : [
                                                                                76,
                                                                                26128,
                                                                                179,
                                                                                97246,
                                                                                198,
                                                                                176664,
                                                                                206,
                                                                                350958,
                                                                                259,
                                                                                422486,
                                                                                260,
                                                                                660566,
                                                                                360,
                                                                                955088,
                                                                                424,
                                                                                1189688,
                                                                                485,
                                                                                1331170,
                                                                                536,
                                                                                1386944,
                                                                                558,
                                                                                1578965,
                                                                                576,
                                                                                1635137,
                                                                                584,
                                                                                1681424,
                                                                                590,
                                                                                1701558,
                                                                                593,
                                                                                1704576,
                                                                                594,
                                                                                1722604,
                                                                                595,
                                                                                1732954
                                                                            ]
                                                                        }
                                                                    }
                                                                }
                                                            ],
                                                            "MaxMemoryUsage" : {
                                                                "Count" : 3,
                                                                "Sum" : 3342336,
                                                                "Max" : 1114112,
                                                                "Min" : 1114112,
                                                                "History" : [
                                                                    2,
                                                                    1114112,
                                                                    7,
                                                                    2228224,
                                                                    8,
                                                                    3342336,
                                                                    595,
                                                                    3342336
                                                                ]
                                                            },
                                                            "Tasks" : 3,
                                                            "FinishedTasks" : 3,
                                                            "PhysicalStageId" : 0,
                                                            "StageDurationUs" : 0,
                                                            "Table" : [
                                                                {
                                                                    "Path" : "/local/test_db/olap_yatests/clickbench/hits"
                                                                }
                                                            ],
                                                            "BaseTimeMs" : 1761493839467,
                                                            "CpuTimeUs" : {
                                                                "Count" : 3,
                                                                "Sum" : 6238,
                                                                "Max" : 2281,
                                                                "Min" : 1794,
                                                                "History" : [
                                                                    2,
                                                                    1723,
                                                                    7,
                                                                    3562,
                                                                    8,
                                                                    4887,
                                                                    76,
                                                                    4958,
                                                                    179,
                                                                    4983,
                                                                    198,
                                                                    5013,
                                                                    206,
                                                                    5044,
                                                                    259,
                                                                    5159,
                                                                    360,
                                                                    5249,
                                                                    424,
                                                                    5314,
                                                                    485,
                                                                    5412,
                                                                    536,
                                                                    5439,
                                                                    558,
                                                                    5518,
                                                                    576,
                                                                    5599,
                                                                    584,
                                                                    5654,
                                                                    590,
                                                                    5740,
                                                                    593,
                                                                    5881,
                                                                    594,
                                                                    6067,
                                                                    595,
                                                                    6238
                                                                ]
                                                            },
                                                            "Ingress" : [
                                                                {
                                                                    "Pop" : { },
                                                                    "External" : { },
                                                                    "Name" : "CS",
                                                                    "Ingress" : { },
                                                                    "Push" : { }
                                                                }
                                                            ],
                                                            "UpdateTimeMs" : 595
                                                        }
                                                    }
                                                ],
                                                "HashFunc" : "HashV1",
                                                "Node Type" : "HashShuffle",
                                                "KeyColumns" : [
                                                    "Minute"
                                                ],
                                                "PlanNodeType" : "Connection"
                                            }
                                        ],
                                        "Operators" : [
                                            {
                                                "Inputs" : [
                                                    {
                                                        "ExternalPlanNodeId" : 2
                                                    }
                                                ],
                                                "Name" : "TopSort",
                                                "Limit" : "10",
                                                "TopSortBy" : "argument.Minute"
                                            }
                                        ],
                                        "Node Type" : "TopSort",
                                        "Stats" : {
                                            "UseLlvm" : "undefined",
                                            "DurationUs" : {
                                                "Count" : 1,
                                                "Sum" : 1000,
                                                "Max" : 1000,
                                                "Min" : 1000
                                            },
                                            "Output" : [
                                                {
                                                    "Pop" : { },
                                                    "Name" : "5",
                                                    "Push" : {
                                                        "WaitTimeUs" : {
                                                            "Count" : 2,
                                                            "Sum" : 1099109,
                                                            "Max" : 557060,
                                                            "Min" : 542049,
                                                            "History" : [
                                                                593,
                                                                1095721,
                                                                596,
                                                                1099109
                                                            ]
                                                        }
                                                    }
                                                }
                                            ],
                                            "MaxMemoryUsage" : {
                                                "Count" : 2,
                                                "Sum" : 2228224,
                                                "Max" : 1114112,
                                                "Min" : 1114112,
                                                "History" : [
                                                    7,
                                                    1114112,
                                                    8,
                                                    2228224,
                                                    596,
                                                    2228224
                                                ]
                                            },
                                            "Tasks" : 2,
                                            "FinishedTasks" : 2,
                                            "PhysicalStageId" : 1,
                                            "StageDurationUs" : 1000,
                                            "BaseTimeMs" : 1761493839467,
                                            "CpuTimeUs" : {
                                                "Count" : 2,
                                                "Sum" : 2032,
                                                "Max" : 1061,
                                                "Min" : 971,
                                                "History" : [
                                                    7,
                                                    949,
                                                    8,
                                                    1844,
                                                    76,
                                                    1918,
                                                    593,
                                                    1965,
                                                    596,
                                                    2032
                                                ]
                                            },
                                            "UpdateTimeMs" : 595,
                                            "Input" : [
                                                {
                                                    "Pop" : { },
                                                    "Name" : "1",
                                                    "Push" : {
                                                        "WaitTimeUs" : {
                                                            "Count" : 2,
                                                            "Sum" : 1184892,
                                                            "Max" : 592636,
                                                            "Min" : 592256,
                                                            "History" : [
                                                                76,
                                                                87096,
                                                                593,
                                                                1183074,
                                                                596,
                                                                1184892
                                                            ]
                                                        }
                                                    }
                                                }
                                            ]
                                        }
                                    }
                                ],
                                "Node Type" : "Merge",
                                "SortColumns" : [
                                    "Minute (Asc)"
                                ],
                                "PlanNodeType" : "Connection"
                            }
                        ],
                        "Operators" : [
                            {
                                "Inputs" : [
                                    {
                                        "ExternalPlanNodeId" : 4
                                    }
                                ],
                                "Name" : "Limit",
                                "Limit" : "10"
                            }
                        ],
                        "Node Type" : "Limit",
                        "Stats" : {
                            "UseLlvm" : "undefined",
                            "Output" : [
                                {
                                    "Pop" : { },
                                    "Name" : "RESULT",
                                    "Push" : {
                                        "WaitTimeUs" : {
                                            "Count" : 1,
                                            "Sum" : 592965,
                                            "Max" : 592965,
                                            "Min" : 592965,
                                            "History" : [
                                                76,
                                                42347,
                                                595,
                                                592965,
                                                596,
                                                592965
                                            ]
                                        }
                                    }
                                }
                            ],
                            "MaxMemoryUsage" : {
                                "Count" : 1,
                                "Sum" : 65536,
                                "Max" : 65536,
                                "Min" : 65536,
                                "History" : [
                                    8,
                                    65536,
                                    596,
                                    65536
                                ]
                            },
                            "Tasks" : 1,
                            "FinishedTasks" : 1,
                            "PhysicalStageId" : 2,
                            "StageDurationUs" : 0,
                            "BaseTimeMs" : 1761493839467,
                            "CpuTimeUs" : {
                                "Count" : 1,
                                "Sum" : 481,
                                "Max" : 481,
                                "Min" : 481,
                                "History" : [
                                    8,
                                    436,
                                    76,
                                    462,
                                    595,
                                    480,
                                    596,
                                    481
                                ]
                            },
                            "UpdateTimeMs" : 596,
                            "Input" : [
                                {
                                    "Pop" : { },
                                    "Name" : "3",
                                    "Push" : {
                                        "WaitTimeUs" : {
                                            "Count" : 1,
                                            "Sum" : 296491,
                                            "Max" : 296491,
                                            "Min" : 296491,
                                            "History" : [
                                                76,
                                                21183,
                                                595,
                                                296491,
                                                596,
                                                296491
                                            ]
                                        }
                                    }
                                }
                            ]
                        }
                    }
                ],
                "Node Type" : "ResultSet_1",
                "PlanNodeType" : "ResultSet"
            }
        ],
        "Node Type" : "Query",
        "Stats" : {
            "Compilation" : {
                "FromCache" : false,
                "DurationUs" : 1586106,
                "CpuTimeUs" : 1570077
            },
            "ProcessCpuTimeUs" : 1513,
            "TotalDurationUs" : 2214493,
            "ResourcePoolId" : "default",
            "QueuedTimeUs" : 0
        },
        "PlanNodeType" : "Query"
    },
    "meta" : {
        "version" : "0.2",
        "type" : "query"
    },
    "SimplifiedPlan" : {
        "PlanNodeId" : 0,
        "Plans" : [
            {
                "PlanNodeId" : 1,
                "Plans" : [
                    {
                        "PlanNodeId" : 2,
                        "Plans" : [
                            {
                                "PlanNodeId" : 4,
                                "Plans" : [
                                    {
                                        "PlanNodeId" : 5,
                                        "Plans" : [
                                            {
                                                "PlanNodeId" : 6,
                                                "Plans" : [
                                                    {
                                                        "PlanNodeId" : 7,
                                                        "Plans" : [
                                                            {
                                                                "PlanNodeId" : 8,
                                                                "Operators" : [
                                                                    {
                                                                        "Scan" : "Parallel",
                                                                        "E-Size" : "3479909.486",
                                                                        "ReadRanges" : [
                                                                            "CounterID [62, 62]"
                                                                        ],
                                                                        "Name" : "TableRangeScan",
                                                                        "Path" : "/local/test_db/olap_yatests/clickbench/hits",
                                                                        "E-Rows" : "140000",
                                                                        "Table" : "olap_yatests/clickbench/hits",
                                                                        "ReadRangesKeys" : [
                                                                            "CounterID"
                                                                        ],
                                                                        "ReadColumns" : [
                                                                            "DontCountHits",
                                                                            "EventDate",
                                                                            "EventTime",
                                                                            "IsRefresh"
                                                                        ],
                                                                        "SsaProgram" : {
                                                                            "Command" : [
                                                                                {
                                                                                    "Assign" : {
                                                                                        "Constant" : {
                                                                                            "Int32" : 0
                                                                                        },
                                                                                        "Column" : {
                                                                                            "Id" : 106
                                                                                        }
                                                                                    }
                                                                                },
                                                                                {
                                                                                    "Assign" : {
                                                                                        "Function" : {
                                                                                            "YqlOperationId" : 11,
                                                                                            "KernelIdx" : 0,
                                                                                            "FunctionType" : 2,
                                                                                            "Arguments" : [
                                                                                                {
                                                                                                    "Id" : 16
                                                                                                },
                                                                                                {
                                                                                                    "Id" : 106
                                                                                                }
                                                                                            ]
                                                                                        },
                                                                                        "Column" : {
                                                                                            "Id" : 107
                                                                                        }
                                                                                    }
                                                                                },
                                                                                {
                                                                                    "Assign" : {
                                                                                        "Constant" : {
                                                                                            "Int32" : 0
                                                                                        },
                                                                                        "Column" : {
                                                                                            "Id" : 108
                                                                                        }
                                                                                    }
                                                                                },
                                                                                {
                                                                                    "Assign" : {
                                                                                        "Function" : {
                                                                                            "YqlOperationId" : 11,
                                                                                            "KernelIdx" : 1,
                                                                                            "FunctionType" : 2,
                                                                                            "Arguments" : [
                                                                                                {
                                                                                                    "Id" : 62
                                                                                                },
                                                                                                {
                                                                                                    "Id" : 108
                                                                                                }
                                                                                            ]
                                                                                        },
                                                                                        "Column" : {
                                                                                            "Id" : 109
                                                                                        }
                                                                                    }
                                                                                },
                                                                                {
                                                                                    "Assign" : {
                                                                                        "Function" : {
                                                                                            "YqlOperationId" : 0,
                                                                                            "KernelIdx" : 2,
                                                                                            "FunctionType" : 2,
                                                                                            "Arguments" : [
                                                                                                {
                                                                                                    "Id" : 107
                                                                                                },
                                                                                                {
                                                                                                    "Id" : 109
                                                                                                }
                                                                                            ]
                                                                                        },
                                                                                        "Column" : {
                                                                                            "Id" : 110
                                                                                        }
                                                                                    }
                                                                                },
                                                                                {
                                                                                    "Assign" : {
                                                                                        "Function" : {
                                                                                            "KernelName" : "",
                                                                                            "KernelIdx" : 3,
                                                                                            "FunctionType" : 2,
                                                                                            "Arguments" : [
                                                                                                {
                                                                                                    "Id" : 6
                                                                                                }
                                                                                            ]
                                                                                        },
                                                                                        "Column" : {
                                                                                            "Id" : 111
                                                                                        }
                                                                                    }
                                                                                },
                                                                                {
                                                                                    "Assign" : {
                                                                                        "Function" : {
                                                                                            "KernelName" : "",
                                                                                            "KernelIdx" : 4,
                                                                                            "FunctionType" : 2,
                                                                                            "Arguments" : [
                                                                                                {
                                                                                                    "Id" : 6
                                                                                                }
                                                                                            ]
                                                                                        },
                                                                                        "Column" : {
                                                                                            "Id" : 112
                                                                                        }
                                                                                    }
                                                                                },
                                                                                {
                                                                                    "Assign" : {
                                                                                        "Function" : {
                                                                                            "YqlOperationId" : 0,
                                                                                            "KernelIdx" : 5,
                                                                                            "FunctionType" : 2,
                                                                                            "Arguments" : [
                                                                                                {
                                                                                                    "Id" : 111
                                                                                                },
                                                                                                {
                                                                                                    "Id" : 112
                                                                                                }
                                                                                            ]
                                                                                        },
                                                                                        "Column" : {
                                                                                            "Id" : 113
                                                                                        }
                                                                                    }
                                                                                },
                                                                                {
                                                                                    "Assign" : {
                                                                                        "Function" : {
                                                                                            "YqlOperationId" : 0,
                                                                                            "KernelIdx" : 6,
                                                                                            "FunctionType" : 2,
                                                                                            "Arguments" : [
                                                                                                {
                                                                                                    "Id" : 110
                                                                                                },
                                                                                                {
                                                                                                    "Id" : 113
                                                                                                }
                                                                                            ]
                                                                                        },
                                                                                        "Column" : {
                                                                                            "Id" : 114
                                                                                        }
                                                                                    }
                                                                                },
                                                                                {
                                                                                    "Filter" : {
                                                                                        "Predicate" : {
                                                                                            "Id" : 114
                                                                                        }
                                                                                    }
                                                                                },
                                                                                {
                                                                                    "Projection" : {
                                                                                        "Columns" : [
                                                                                            {
                                                                                                "Id" : 5
                                                                                            }
                                                                                        ]
                                                                                    }
                                                                                }
                                                                            ]
                                                                        },
                                                                        "E-Cost" : "0",
                                                                        "ReadRangesExpectedSize" : 1
                                                                    }
                                                                ],
                                                                "Node Type" : "TableRangeScan"
                                                            }
                                                        ],
                                                        "Operators" : [
                                                            {
                                                                "E-Rows" : "350",
                                                                "Predicate" : "IsRefresh == 0 AND DontCountHits == 0 AND EventDate >= \"15900\" AND EventDate <= \"15901\"",
                                                                "Pushdown" : "True",
                                                                "Name" : "Filter",
                                                                "E-Size" : "8699.773714",
                                                                "E-Cost" : "0"
                                                            }
                                                        ],
                                                        "Node Type" : "Filter"
                                                    }
                                                ],
                                                "Operators" : [
                                                    {
                                                        "GroupBy" : "[0]",
                                                        "A-SelfCpu" : 2.281,
                                                        "Aggregation" : "",
                                                        "A-Cpu" : 2.281,
                                                        "Name" : "Aggregate",
                                                        "Phase" : "Intermediate"
                                                    }
                                                ],
                                                "Node Type" : "Aggregate"
                                            }
                                        ],
                                        "Node Type" : "HashShuffle (KeyColumns: [\"Minute\"], HashFunc: \"HashV1\")",
                                        "PlanNodeType" : "Connection"
                                    }
                                ],
                                "Operators" : [
                                    {
                                        "A-SelfCpu" : 1.061,
                                        "A-Cpu" : 3.342,
                                        "Name" : "TopSort",
                                        "Limit" : "10",
                                        "TopSortBy" : "argument.Minute"
                                    }
                                ],
                                "Node Type" : "TopSort"
                            }
                        ],
                        "Operators" : [
                            {
                                "A-SelfCpu" : 0.481,
                                "A-Cpu" : 3.823,
                                "Name" : "Limit",
                                "Limit" : "10"
                            }
                        ],
                        "Node Type" : "Limit"
                    }
                ],
                "Node Type" : "ResultSet_1",
                "PlanNodeType" : "ResultSet"
            }
        ],
        "Node Type" : "Query",
        "PlanNodeType" : "Query"
    }
}
