{
    "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
                                                                    }
                                                                ],
                                                                "E-Rows" : "900",
                                                                "Predicate" : "IsRefresh == 0 AND IsLink != 0 AND IsDownload == 0",
                                                                "Pushdown" : "True",
                                                                "Name" : "Filter",
                                                                "E-Size" : "18129.18309",
                                                                "E-Cost" : "0"
                                                            },
                                                            {
                                                                "Scan" : "Parallel",
                                                                "E-Size" : "2014353.676",
                                                                "ReadRanges" : [
                                                                    "CounterID [62, 62]",
                                                                    "EventDate [15887, 15917]"
                                                                ],
                                                                "Name" : "TableRangeScan",
                                                                "Inputs" : [ ],
                                                                "Path" : "/local/test_db/olap_yatests/clickbench/hits",
                                                                "E-Rows" : "100000",
                                                                "Table" : "olap_yatests/clickbench/hits",
                                                                "ReadRangesKeys" : [
                                                                    "CounterID",
                                                                    "EventDate"
                                                                ],
                                                                "ReadColumns" : [
                                                                    "IsDownload",
                                                                    "IsLink",
                                                                    "IsRefresh",
                                                                    "URL"
                                                                ],
                                                                "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" : 12,
                                                                                    "KernelIdx" : 1,
                                                                                    "FunctionType" : 2,
                                                                                    "Arguments" : [
                                                                                        {
                                                                                            "Id" : 53
                                                                                        },
                                                                                        {
                                                                                            "Id" : 108
                                                                                        }
                                                                                    ]
                                                                                },
                                                                                "Column" : {
                                                                                    "Id" : 109
                                                                                }
                                                                            }
                                                                        },
                                                                        {
                                                                            "Assign" : {
                                                                                "Constant" : {
                                                                                    "Int32" : 0
                                                                                },
                                                                                "Column" : {
                                                                                    "Id" : 110
                                                                                }
                                                                            }
                                                                        },
                                                                        {
                                                                            "Assign" : {
                                                                                "Function" : {
                                                                                    "YqlOperationId" : 11,
                                                                                    "KernelIdx" : 2,
                                                                                    "FunctionType" : 2,
                                                                                    "Arguments" : [
                                                                                        {
                                                                                            "Id" : 54
                                                                                        },
                                                                                        {
                                                                                            "Id" : 110
                                                                                        }
                                                                                    ]
                                                                                },
                                                                                "Column" : {
                                                                                    "Id" : 111
                                                                                }
                                                                            }
                                                                        },
                                                                        {
                                                                            "Assign" : {
                                                                                "Function" : {
                                                                                    "YqlOperationId" : 0,
                                                                                    "KernelIdx" : 3,
                                                                                    "FunctionType" : 2,
                                                                                    "Arguments" : [
                                                                                        {
                                                                                            "Id" : 109
                                                                                        },
                                                                                        {
                                                                                            "Id" : 111
                                                                                        }
                                                                                    ]
                                                                                },
                                                                                "Column" : {
                                                                                    "Id" : 112
                                                                                }
                                                                            }
                                                                        },
                                                                        {
                                                                            "Assign" : {
                                                                                "Function" : {
                                                                                    "YqlOperationId" : 0,
                                                                                    "KernelIdx" : 4,
                                                                                    "FunctionType" : 2,
                                                                                    "Arguments" : [
                                                                                        {
                                                                                            "Id" : 107
                                                                                        },
                                                                                        {
                                                                                            "Id" : 112
                                                                                        }
                                                                                    ]
                                                                                },
                                                                                "Column" : {
                                                                                    "Id" : 113
                                                                                }
                                                                            }
                                                                        },
                                                                        {
                                                                            "Filter" : {
                                                                                "Predicate" : {
                                                                                    "Id" : 113
                                                                                }
                                                                            }
                                                                        },
                                                                        {
                                                                            "GroupBy" : {
                                                                                "Aggregates" : [
                                                                                    {
                                                                                        "Function" : {
                                                                                            "Id" : 2
                                                                                        },
                                                                                        "Column" : {
                                                                                            "Id" : 114
                                                                                        }
                                                                                    }
                                                                                ],
                                                                                "KeyColumns" : [
                                                                                    {
                                                                                        "Id" : 14
                                                                                    }
                                                                                ]
                                                                            }
                                                                        },
                                                                        {
                                                                            "Projection" : {
                                                                                "Columns" : [
                                                                                    {
                                                                                        "Id" : 14
                                                                                    },
                                                                                    {
                                                                                        "Id" : 114
                                                                                    }
                                                                                ]
                                                                            }
                                                                        }
                                                                    ]
                                                                },
                                                                "E-Cost" : "0",
                                                                "ReadRangesExpectedSize" : 1
                                                            }
                                                        ],
                                                        "Node Type" : "Filter-TableRangeScan",
                                                        "Stats" : {
                                                            "UseLlvm" : "undefined",
                                                            "Output" : [
                                                                {
                                                                    "Pop" : { },
                                                                    "Name" : "3",
                                                                    "Push" : {
                                                                        "WaitTimeUs" : {
                                                                            "Count" : 3,
                                                                            "Sum" : 1103178,
                                                                            "Max" : 374135,
                                                                            "Min" : 360538,
                                                                            "History" : [
                                                                                1007,
                                                                                815544,
                                                                                1029,
                                                                                853859,
                                                                                1059,
                                                                                887109,
                                                                                1064,
                                                                                980166,
                                                                                1065,
                                                                                1059840,
                                                                                1078,
                                                                                1070912,
                                                                                1081,
                                                                                1086159,
                                                                                1083,
                                                                                1103178
                                                                            ]
                                                                        }
                                                                    }
                                                                }
                                                            ],
                                                            "MaxMemoryUsage" : {
                                                                "Count" : 3,
                                                                "Sum" : 3342336,
                                                                "Max" : 1114112,
                                                                "Min" : 1114112,
                                                                "History" : [
                                                                    0,
                                                                    1114112,
                                                                    774,
                                                                    3342336,
                                                                    1083,
                                                                    3342336
                                                                ]
                                                            },
                                                            "Tasks" : 3,
                                                            "FinishedTasks" : 3,
                                                            "PhysicalStageId" : 0,
                                                            "StageDurationUs" : 0,
                                                            "Table" : [
                                                                {
                                                                    "Path" : "/local/test_db/olap_yatests/clickbench/hits"
                                                                }
                                                            ],
                                                            "BaseTimeMs" : 1762353294154,
                                                            "CpuTimeUs" : {
                                                                "Count" : 3,
                                                                "Sum" : 4229,
                                                                "Max" : 1982,
                                                                "Min" : 1063,
                                                                "History" : [
                                                                    0,
                                                                    1856,
                                                                    773,
                                                                    2794,
                                                                    774,
                                                                    3842,
                                                                    1007,
                                                                    3878,
                                                                    1029,
                                                                    3889,
                                                                    1059,
                                                                    3895,
                                                                    1064,
                                                                    3924,
                                                                    1065,
                                                                    3958,
                                                                    1078,
                                                                    4035,
                                                                    1081,
                                                                    4134,
                                                                    1083,
                                                                    4229
                                                                ]
                                                            },
                                                            "Ingress" : [
                                                                {
                                                                    "Pop" : { },
                                                                    "External" : { },
                                                                    "Name" : "CS",
                                                                    "Ingress" : { },
                                                                    "Push" : { }
                                                                }
                                                            ],
                                                            "UpdateTimeMs" : 1082
                                                        }
                                                    }
                                                ],
                                                "HashFunc" : "HashV1",
                                                "Node Type" : "HashShuffle",
                                                "KeyColumns" : [
                                                    "URL"
                                                ],
                                                "PlanNodeType" : "Connection"
                                            }
                                        ],
                                        "Operators" : [
                                            {
                                                "Inputs" : [
                                                    {
                                                        "ExternalPlanNodeId" : 2
                                                    }
                                                ],
                                                "Name" : "TopSort",
                                                "Limit" : "10",
                                                "TopSortBy" : "argument.Count0"
                                            }
                                        ],
                                        "Node Type" : "TopSort",
                                        "Stats" : {
                                            "UseLlvm" : "undefined",
                                            "DurationUs" : {
                                                "Count" : 2,
                                                "Sum" : 3000,
                                                "Max" : 2000,
                                                "Min" : 1000
                                            },
                                            "Output" : [
                                                {
                                                    "Pop" : { },
                                                    "Name" : "5",
                                                    "Push" : {
                                                        "WaitTimeUs" : {
                                                            "Count" : 2,
                                                            "Sum" : 776311,
                                                            "Max" : 404153,
                                                            "Min" : 372158,
                                                            "History" : [
                                                                1078,
                                                                765625,
                                                                1084,
                                                                776311
                                                            ]
                                                        }
                                                    }
                                                }
                                            ],
                                            "MaxMemoryUsage" : {
                                                "Count" : 2,
                                                "Sum" : 2228224,
                                                "Max" : 1114112,
                                                "Min" : 1114112,
                                                "History" : [
                                                    492,
                                                    2228224,
                                                    1085,
                                                    2228224
                                                ]
                                            },
                                            "Tasks" : 2,
                                            "FinishedTasks" : 2,
                                            "PhysicalStageId" : 1,
                                            "StageDurationUs" : 2000,
                                            "BaseTimeMs" : 1762353294154,
                                            "CpuTimeUs" : {
                                                "Count" : 2,
                                                "Sum" : 793,
                                                "Max" : 411,
                                                "Min" : 382,
                                                "History" : [
                                                    492,
                                                    679,
                                                    773,
                                                    699,
                                                    774,
                                                    720,
                                                    1059,
                                                    720,
                                                    1078,
                                                    746,
                                                    1084,
                                                    793
                                                ]
                                            },
                                            "UpdateTimeMs" : 1084,
                                            "Input" : [
                                                {
                                                    "Pop" : { },
                                                    "Name" : "1",
                                                    "Push" : {
                                                        "WaitTimeUs" : {
                                                            "Count" : 2,
                                                            "Sum" : 2125908,
                                                            "Max" : 1063240,
                                                            "Min" : 1062668,
                                                            "History" : [
                                                                773,
                                                                661363,
                                                                774,
                                                                1354123,
                                                                1059,
                                                                1354123,
                                                                1078,
                                                                2120003,
                                                                1084,
                                                                2125908
                                                            ]
                                                        }
                                                    }
                                                }
                                            ]
                                        }
                                    }
                                ],
                                "Node Type" : "Merge",
                                "SortColumns" : [
                                    "Count0 (Desc)"
                                ],
                                "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" : 1065522,
                                            "Max" : 1065522,
                                            "Min" : 1065522,
                                            "History" : [
                                                773,
                                                659963,
                                                1029,
                                                659963,
                                                1083,
                                                1065522,
                                                1085,
                                                1065522
                                            ]
                                        }
                                    }
                                }
                            ],
                            "MaxMemoryUsage" : {
                                "Count" : 1,
                                "Sum" : 65536,
                                "Max" : 65536,
                                "Min" : 65536,
                                "History" : [
                                    492,
                                    65536,
                                    1085,
                                    65536
                                ]
                            },
                            "Tasks" : 1,
                            "FinishedTasks" : 1,
                            "PhysicalStageId" : 2,
                            "StageDurationUs" : 0,
                            "BaseTimeMs" : 1762353294154,
                            "CpuTimeUs" : {
                                "Count" : 1,
                                "Sum" : 154,
                                "Max" : 154,
                                "Min" : 154,
                                "History" : [
                                    492,
                                    114,
                                    773,
                                    131,
                                    1029,
                                    131,
                                    1083,
                                    152,
                                    1085,
                                    154
                                ]
                            },
                            "UpdateTimeMs" : 1084,
                            "Input" : [
                                {
                                    "Pop" : { },
                                    "Name" : "3",
                                    "Push" : {
                                        "WaitTimeUs" : {
                                            "Count" : 1,
                                            "Sum" : 532765,
                                            "Max" : 532765,
                                            "Min" : 532765,
                                            "History" : [
                                                773,
                                                329979,
                                                1029,
                                                329979,
                                                1083,
                                                532765,
                                                1085,
                                                532765
                                            ]
                                        }
                                    }
                                }
                            ]
                        }
                    }
                ],
                "Node Type" : "ResultSet_1",
                "PlanNodeType" : "ResultSet"
            }
        ],
        "Node Type" : "Query",
        "Stats" : {
            "Compilation" : {
                "FromCache" : false,
                "DurationUs" : 1952917,
                "CpuTimeUs" : 1927824
            },
            "ProcessCpuTimeUs" : 1422,
            "TotalDurationUs" : 3097951,
            "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,
                                                        "Operators" : [
                                                            {
                                                                "Scan" : "Parallel",
                                                                "E-Size" : "2014353.676",
                                                                "ReadRanges" : [
                                                                    "CounterID [62, 62]",
                                                                    "EventDate [15887, 15917]"
                                                                ],
                                                                "Name" : "TableRangeScan",
                                                                "Path" : "/local/test_db/olap_yatests/clickbench/hits",
                                                                "E-Rows" : "100000",
                                                                "Table" : "olap_yatests/clickbench/hits",
                                                                "ReadRangesKeys" : [
                                                                    "CounterID",
                                                                    "EventDate"
                                                                ],
                                                                "ReadColumns" : [
                                                                    "IsDownload",
                                                                    "IsLink",
                                                                    "IsRefresh",
                                                                    "URL"
                                                                ],
                                                                "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" : 12,
                                                                                    "KernelIdx" : 1,
                                                                                    "FunctionType" : 2,
                                                                                    "Arguments" : [
                                                                                        {
                                                                                            "Id" : 53
                                                                                        },
                                                                                        {
                                                                                            "Id" : 108
                                                                                        }
                                                                                    ]
                                                                                },
                                                                                "Column" : {
                                                                                    "Id" : 109
                                                                                }
                                                                            }
                                                                        },
                                                                        {
                                                                            "Assign" : {
                                                                                "Constant" : {
                                                                                    "Int32" : 0
                                                                                },
                                                                                "Column" : {
                                                                                    "Id" : 110
                                                                                }
                                                                            }
                                                                        },
                                                                        {
                                                                            "Assign" : {
                                                                                "Function" : {
                                                                                    "YqlOperationId" : 11,
                                                                                    "KernelIdx" : 2,
                                                                                    "FunctionType" : 2,
                                                                                    "Arguments" : [
                                                                                        {
                                                                                            "Id" : 54
                                                                                        },
                                                                                        {
                                                                                            "Id" : 110
                                                                                        }
                                                                                    ]
                                                                                },
                                                                                "Column" : {
                                                                                    "Id" : 111
                                                                                }
                                                                            }
                                                                        },
                                                                        {
                                                                            "Assign" : {
                                                                                "Function" : {
                                                                                    "YqlOperationId" : 0,
                                                                                    "KernelIdx" : 3,
                                                                                    "FunctionType" : 2,
                                                                                    "Arguments" : [
                                                                                        {
                                                                                            "Id" : 109
                                                                                        },
                                                                                        {
                                                                                            "Id" : 111
                                                                                        }
                                                                                    ]
                                                                                },
                                                                                "Column" : {
                                                                                    "Id" : 112
                                                                                }
                                                                            }
                                                                        },
                                                                        {
                                                                            "Assign" : {
                                                                                "Function" : {
                                                                                    "YqlOperationId" : 0,
                                                                                    "KernelIdx" : 4,
                                                                                    "FunctionType" : 2,
                                                                                    "Arguments" : [
                                                                                        {
                                                                                            "Id" : 107
                                                                                        },
                                                                                        {
                                                                                            "Id" : 112
                                                                                        }
                                                                                    ]
                                                                                },
                                                                                "Column" : {
                                                                                    "Id" : 113
                                                                                }
                                                                            }
                                                                        },
                                                                        {
                                                                            "Filter" : {
                                                                                "Predicate" : {
                                                                                    "Id" : 113
                                                                                }
                                                                            }
                                                                        },
                                                                        {
                                                                            "GroupBy" : {
                                                                                "Aggregates" : [
                                                                                    {
                                                                                        "Function" : {
                                                                                            "Id" : 2
                                                                                        },
                                                                                        "Column" : {
                                                                                            "Id" : 114
                                                                                        }
                                                                                    }
                                                                                ],
                                                                                "KeyColumns" : [
                                                                                    {
                                                                                        "Id" : 14
                                                                                    }
                                                                                ]
                                                                            }
                                                                        },
                                                                        {
                                                                            "Projection" : {
                                                                                "Columns" : [
                                                                                    {
                                                                                        "Id" : 14
                                                                                    },
                                                                                    {
                                                                                        "Id" : 114
                                                                                    }
                                                                                ]
                                                                            }
                                                                        }
                                                                    ]
                                                                },
                                                                "E-Cost" : "0",
                                                                "ReadRangesExpectedSize" : 1
                                                            }
                                                        ],
                                                        "Node Type" : "TableRangeScan"
                                                    }
                                                ],
                                                "Operators" : [
                                                    {
                                                        "E-Size" : "18129.18309",
                                                        "Name" : "Filter",
                                                        "Predicate" : "IsRefresh == 0 AND IsLink != 0 AND IsDownload == 0",
                                                        "A-SelfCpu" : 1.982,
                                                        "E-Rows" : "900",
                                                        "A-Cpu" : 1.982,
                                                        "Pushdown" : "True",
                                                        "E-Cost" : "0"
                                                    }
                                                ],
                                                "Node Type" : "Filter"
                                            }
                                        ],
                                        "Node Type" : "HashShuffle (KeyColumns: [\"URL\"], HashFunc: \"HashV1\")",
                                        "PlanNodeType" : "Connection"
                                    }
                                ],
                                "Operators" : [
                                    {
                                        "A-SelfCpu" : 0.411,
                                        "A-Cpu" : 2.393,
                                        "Name" : "TopSort",
                                        "Limit" : "10",
                                        "TopSortBy" : "argument.Count0"
                                    }
                                ],
                                "Node Type" : "TopSort"
                            }
                        ],
                        "Operators" : [
                            {
                                "A-SelfCpu" : 0.154,
                                "A-Cpu" : 2.547,
                                "Name" : "Limit",
                                "Limit" : "10"
                            }
                        ],
                        "Node Type" : "Limit"
                    }
                ],
                "Node Type" : "ResultSet_1",
                "PlanNodeType" : "ResultSet"
            }
        ],
        "Node Type" : "Query",
        "PlanNodeType" : "Query"
    }
}
