zoukankan      html  css  js  c++  java
  • Eliminates these repeated computation in multi aggregations query

    https://github.com/pingcap/tispark/commit/dcca23bfa1aa0c356a4280d82bc8301c0de08318

    scala> spark.sql ("select count(number),avg(number) from person").explain
    == Physical Plan ==
    *HashAggregate(keys=[], functions=[sum(count(number#0L)#42L), sum(sum(number#0L)#43L), sum(count(number#0L)#45L)])
    +- Exchange SinglePartition
       +- *HashAggregate(keys=[], functions=[partial_sum(count(number#0L)#42L), partial_sum(sum(number#0L)#43L), partial_sum(count(number#0L)#45L)])
          +- Scan CoprocessorRDD[count(number#0L)#42L,sum(number#0L)#43L,count(number#0L)#45L]
      
    	  
    
    	  
    scala> spark.sql ("select count(number),avg(number) from person").explain()
    == Physical Plan ==
    *HashAggregate(keys=[], functions=[sum(count(number#0L)#20L), sum(sum(number#0L)#21L), sum(count(number#0L)#20L)])
    +- Exchange SinglePartition
       +- *HashAggregate(keys=[], functions=[partial_sum(count(number#0L)#20L), partial_sum(sum(number#0L)#21L), partial_sum(count(number#0L)#20L)])
          +- Scan CoprocessorRDD[count(number#0L)#20L,sum(number#0L)#21L]
    	  
    

      

  • 相关阅读:
    Servlet开发
    HTML实现页面自动跳转的五种方法
    AVAYA话机管理
    AVAYA路由
    报关相关知识
    基本杆法
    AVAYA初始配置
    加塞和瞄准
    基本杆法图解
    AVAYA拨号计划
  • 原文地址:https://www.cnblogs.com/rsapaper/p/7756634.html
Copyright © 2011-2022 走看看