1. 03 9月, 2020 3 次提交
    • A
      Force WithMergeableStateAfterAggregation via distributed_group_by_no_merge (convert to UInt64) · fffeeeba
      Azat Khuzhin 提交于
      Possible values:
      - 1 - Do not merge aggregation states from different servers for distributed query processing - in case it is for certain that there are different keys on different shards.
      - 2 - same as 1 but also apply ORDER BY and LIMIT stages
      fffeeeba
    • A
      Optimize queries with LIMIT/LIMIT BY/ORDER BY for distributed with GROUP BY sharding_key · 10b4f3b4
      Azat Khuzhin 提交于
      Previous set of QueryProcessingStage does not allow to do this.
      But after WithMergeableStateAfterAggregation had been introduced the
      following queries can be optimized too under
      optimize_distributed_group_by_sharding_key:
      - GROUP BY sharding_key LIMIT
      - GROUP BY sharding_key LIMIT BY
      - GROUP BY sharding_key ORDER BY
      
      And right now it is still not supports:
      - WITH TOTALS (looks like it can be supported)
      - WITH ROLLUP (looks like it can be supported)
      - WITH CUBE
      - SETTINGS extremes=1 (looks like it can be supported)
      But will be implemented separatelly.
      
      vX: fixes
      v2: fix WITH *
      v3: fix extremes
      v4: fix LIMIT OFFSET (and make a little bit cleaner)
      v5: fix HAVING
      v6: fix ORDER BY
      v7: rebase against 20.7
      v8: move out WithMergeableStateAfterAggregation
      v9: add optimize_distributed_group_by_sharding_key into test names
      10b4f3b4
    • A
      Add new query processing stage WithMergeableStateAfterAggregation · 4043be31
      Azat Khuzhin 提交于
      Process query until the stage where the aggregate functions were
      calculated and finalized.
      
      It will be used for optimize_distributed_group_by_sharding_key.
      
      v2: fix aliases
      v3: Fix protocol ABI breakage due to WithMergeableStateAfterAggregation
          Conditions >= for QueryProcessingStage::Enum has been verified, and they
          are ok (in InterpreterSelectQuery).
      4043be31
  2. 02 9月, 2020 30 次提交
  3. 01 9月, 2020 7 次提交