{
    "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" : "250",
                                                                "Predicate" : "IsRefresh == 0 AND DontCountHits == 0 AND EventDate >= \"15900\" AND EventDate <= \"15901\"",
                                                                "Pushdown" : "True",
                                                                "Name" : "Filter",
                                                                "E-Size" : "5035.88419",
                                                                "E-Cost" : "0"
                                                            },
                                                            {
                                                                "Scan" : "Parallel",
                                                                "E-Size" : "2014353.676",
                                                                "ReadRanges" : [
                                                                    "CounterID [62, 62]"
                                                                ],
                                                                "Name" : "TableRangeScan",
                                                                "Inputs" : [ ],
                                                                "Path" : "/local/test_db/olap_yatests/clickbench/hits",
                                                                "E-Rows" : "100000",
                                                                "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" : 2365977,
                                                                            "Max" : 789868,
                                                                            "Min" : 787635,
                                                                            "History" : [
                                                                                309,
                                                                                846547,
                                                                                484,
                                                                                1100907,
                                                                                539,
                                                                                1242008,
                                                                                540,
                                                                                1467811,
                                                                                556,
                                                                                1488195,
                                                                                564,
                                                                                1551572,
                                                                                615,
                                                                                1658425,
                                                                                698,
                                                                                1912810,
                                                                                771,
                                                                                2169784,
                                                                                791,
                                                                                2292935,
                                                                                802,
                                                                                2313686,
                                                                                803,
                                                                                2336046,
                                                                                806,
                                                                                2339279,
                                                                                807,
                                                                                2359024,
                                                                                809,
                                                                                2365977
                                                                            ]
                                                                        }
                                                                    }
                                                                }
                                                            ],
                                                            "MaxMemoryUsage" : {
                                                                "Count" : 3,
                                                                "Sum" : 3342336,
                                                                "Max" : 1114112,
                                                                "Min" : 1114112,
                                                                "History" : [
                                                                    235,
                                                                    2228224,
                                                                    236,
                                                                    3342336,
                                                                    809,
                                                                    3342336
                                                                ]
                                                            },
                                                            "Tasks" : 3,
                                                            "FinishedTasks" : 3,
                                                            "PhysicalStageId" : 0,
                                                            "StageDurationUs" : 0,
                                                            "Table" : [
                                                                {
                                                                    "Path" : "/local/test_db/olap_yatests/clickbench/hits"
                                                                }
                                                            ],
                                                            "BaseTimeMs" : 1762353317728,
                                                            "CpuTimeUs" : {
                                                                "Count" : 3,
                                                                "Sum" : 7612,
                                                                "Max" : 3465,
                                                                "Min" : 1925,
                                                                "History" : [
                                                                    235,
                                                                    6502,
                                                                    309,
                                                                    6585,
                                                                    484,
                                                                    6666,
                                                                    539,
                                                                    6696,
                                                                    540,
                                                                    6742,
                                                                    556,
                                                                    6769,
                                                                    564,
                                                                    6799,
                                                                    615,
                                                                    6859,
                                                                    698,
                                                                    6962,
                                                                    771,
                                                                    7057,
                                                                    791,
                                                                    7145,
                                                                    802,
                                                                    7205,
                                                                    803,
                                                                    7290,
                                                                    806,
                                                                    7379,
                                                                    807,
                                                                    7498,
                                                                    809,
                                                                    7612
                                                                ]
                                                            },
                                                            "Ingress" : [
                                                                {
                                                                    "Pop" : { },
                                                                    "External" : { },
                                                                    "Name" : "CS",
                                                                    "Ingress" : { },
                                                                    "Push" : { }
                                                                }
                                                            ],
                                                            "UpdateTimeMs" : 808
                                                        }
                                                    }
                                                ],
                                                "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" : 1588442,
                                                            "Max" : 798523,
                                                            "Min" : 789919,
                                                            "History" : [
                                                                806,
                                                                1584428,
                                                                809,
                                                                1588442
                                                            ]
                                                        }
                                                    }
                                                }
                                            ],
                                            "MaxMemoryUsage" : {
                                                "Count" : 2,
                                                "Sum" : 2228224,
                                                "Max" : 1114112,
                                                "Min" : 1114112,
                                                "History" : [
                                                    2,
                                                    1114112,
                                                    18,
                                                    2228224,
                                                    809,
                                                    2228224
                                                ]
                                            },
                                            "Tasks" : 2,
                                            "FinishedTasks" : 2,
                                            "PhysicalStageId" : 1,
                                            "StageDurationUs" : 1000,
                                            "BaseTimeMs" : 1762353317728,
                                            "CpuTimeUs" : {
                                                "Count" : 2,
                                                "Sum" : 1704,
                                                "Max" : 1116,
                                                "Min" : 588,
                                                "History" : [
                                                    1,
                                                    1036,
                                                    18,
                                                    1567,
                                                    806,
                                                    1631,
                                                    809,
                                                    1704
                                                ]
                                            },
                                            "UpdateTimeMs" : 809,
                                            "Input" : [
                                                {
                                                    "Pop" : { },
                                                    "Name" : "1",
                                                    "Push" : {
                                                        "WaitTimeUs" : {
                                                            "Count" : 2,
                                                            "Sum" : 1603944,
                                                            "Max" : 806444,
                                                            "Min" : 797500,
                                                            "History" : [
                                                                806,
                                                                1602021,
                                                                809,
                                                                1603944
                                                            ]
                                                        }
                                                    }
                                                }
                                            ]
                                        }
                                    }
                                ],
                                "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" : 801125,
                                            "Max" : 801125,
                                            "Min" : 801125,
                                            "History" : [
                                                809,
                                                801125
                                            ]
                                        }
                                    }
                                }
                            ],
                            "MaxMemoryUsage" : {
                                "Count" : 1,
                                "Sum" : 65536,
                                "Max" : 65536,
                                "Min" : 65536,
                                "History" : [
                                    18,
                                    65536,
                                    809,
                                    65536
                                ]
                            },
                            "Tasks" : 1,
                            "FinishedTasks" : 1,
                            "PhysicalStageId" : 2,
                            "StageDurationUs" : 0,
                            "BaseTimeMs" : 1762353317728,
                            "CpuTimeUs" : {
                                "Count" : 1,
                                "Sum" : 701,
                                "Max" : 701,
                                "Min" : 701,
                                "History" : [
                                    18,
                                    681,
                                    809,
                                    701
                                ]
                            },
                            "UpdateTimeMs" : 809,
                            "Input" : [
                                {
                                    "Pop" : { },
                                    "Name" : "3",
                                    "Push" : {
                                        "WaitTimeUs" : {
                                            "Count" : 1,
                                            "Sum" : 400572,
                                            "Max" : 400572,
                                            "Min" : 400572,
                                            "History" : [
                                                809,
                                                400572
                                            ]
                                        }
                                    }
                                }
                            ]
                        }
                    }
                ],
                "Node Type" : "ResultSet_1",
                "PlanNodeType" : "ResultSet"
            }
        ],
        "Node Type" : "Query",
        "Stats" : {
            "Compilation" : {
                "FromCache" : false,
                "DurationUs" : 2095796,
                "CpuTimeUs" : 2081409
            },
            "ProcessCpuTimeUs" : 1534,
            "TotalDurationUs" : 2968533,
            "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" : "2014353.676",
                                                                        "ReadRanges" : [
                                                                            "CounterID [62, 62]"
                                                                        ],
                                                                        "Name" : "TableRangeScan",
                                                                        "Path" : "/local/test_db/olap_yatests/clickbench/hits",
                                                                        "E-Rows" : "100000",
                                                                        "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" : "250",
                                                                "Predicate" : "IsRefresh == 0 AND DontCountHits == 0 AND EventDate >= \"15900\" AND EventDate <= \"15901\"",
                                                                "Pushdown" : "True",
                                                                "Name" : "Filter",
                                                                "E-Size" : "5035.88419",
                                                                "E-Cost" : "0"
                                                            }
                                                        ],
                                                        "Node Type" : "Filter"
                                                    }
                                                ],
                                                "Operators" : [
                                                    {
                                                        "GroupBy" : "[0]",
                                                        "A-SelfCpu" : 3.465,
                                                        "Aggregation" : "",
                                                        "A-Cpu" : 3.465,
                                                        "Name" : "Aggregate",
                                                        "Phase" : "Intermediate"
                                                    }
                                                ],
                                                "Node Type" : "Aggregate"
                                            }
                                        ],
                                        "Node Type" : "HashShuffle (KeyColumns: [\"Minute\"], HashFunc: \"HashV1\")",
                                        "PlanNodeType" : "Connection"
                                    }
                                ],
                                "Operators" : [
                                    {
                                        "A-SelfCpu" : 1.116,
                                        "A-Cpu" : 4.581,
                                        "Name" : "TopSort",
                                        "Limit" : "10",
                                        "TopSortBy" : "argument.Minute"
                                    }
                                ],
                                "Node Type" : "TopSort"
                            }
                        ],
                        "Operators" : [
                            {
                                "A-SelfCpu" : 0.701,
                                "A-Cpu" : 5.282,
                                "Name" : "Limit",
                                "Limit" : "10"
                            }
                        ],
                        "Node Type" : "Limit"
                    }
                ],
                "Node Type" : "ResultSet_1",
                "PlanNodeType" : "ResultSet"
            }
        ],
        "Node Type" : "Query",
        "PlanNodeType" : "Query"
    }
}
