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]
    	  
    

      

  • 相关阅读:
    [转]initrd.img, vmlinux
    [转]关于arm 上kernel, qemu起VM等
    [转]overlayFS
    [转]virtiofs
    [转] dynamic DMA mapping
    [转] cpu亲和性
    [转] /dev/shm
    huginn,n8n,ifttt
    ipfs---protocol, filesystem,web p2p,cdn
    gpg,pgp--
  • 原文地址:https://www.cnblogs.com/rsapaper/p/7756634.html
Copyright © 2011-2022 走看看