首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往
您找到你想要的搜索结果了吗?
是的
没有找到

Hive优化器原理与源码解析系列--优化规则AggregateProjectPullUpConstantsRule(十七)

final Aggregate aggregate = call.rel(0); final RelNode input = call.rel(1); final int groupCount = aggregate.getGroupCount...key, constants.get(ref)); } } if (map.isEmpty()) { //如果groupBy引用的字段,都不是常量,则退出优化 return; } if (groupCount...移除第一个元素在这里不是最优的,不过,它将允许我们使用下面的快速路径(只需修剪groupCount)。 创建上拉的Aggregate聚合操作,移除聚合中使用的常量。...newAggCalls.add( aggCall.adaptTo(input, aggCall.getArgList(), aggCall.filterArg, groupCount...aggregate.getRowType().getFieldList()) {//遍历聚合的字段列表 RexNode expr; final int i = field.getIndex(); if (i >= groupCount

1.4K10
领券
http://www.vxiaotou.com