Databend is an open source elastic and reliable Modern Cloud Data Warehouse, it offers blazing fast query and combines elasticity, simplicity, low cost of the cloud, built to make the Data Cloud easy.

Big changes

Below is a list of some major changes that we don't want you to miss.

Features

  • add system$clustering_information function (#5426)
  • add statistics to TableMeta (#5476)
  • add metasrv time travel functions (#5468 & #5566)
  • snapshot timestamp & navigation (#5535)
  • undrop table & show history (#5562)

Migrate to new planner

  • translate subquery into apply operator (#5510)
  • common tree structure formatter for plan display (#5512)
  • support TRIM function in new planner (#5541)
  • support array literal in new planner (#5551)

New functions

  • support object_keys function (#5461)
  • support compare variant with other data types (#5463)
  • support variant max/min functions (#5525)
  • support variant as function (#5442)
  • add user function (#5584)

Improvement

  • replace todos in datavalues with ErrorCode (#5475)
  • add stage quota for tenant (#5575)
  • simplify catalog and meta (#5560)

hash join performance improvement

  • optimize hash join, ~6x performance improvement (#5497)
  • use DataBlock::gather_blocks in hash join, ~2x performance improvement in some cases (#5534)

Build / Testing / CI

  • fix bugs of logic test scripts and some cases (#5578)

Documentation

  • add i18n support with crowdin (#5545),

Bug fixes

  • fix retention aggregation coredump bug (#5450)
  • fix server hang when parallel execute query (#5482)
  • fix wrong output in hash join (#5538 & #5539)

Tips

Let's learn a weekly tip from Databend.

Do Conversion Funnel Analysis With Databend

Funnel analysis measures the number of unique users who has performed a set of actions, and we use it to see drop-off and conversion in multi-step processes.

Create a Table

CREATE TABLE events(user_id BIGINT, event_name VARCHAR, event_timestamp TIMESTAMP);

Now we have a table with the following fields:

  • user_id - a unique identifier for user
  • event_name - type of the event, like: login, visit, cart and purchase
  • event_timestamp - timestamp which event occurred

Funnel Analysis

It's easy and performance to use Databend WINDOW_FUNNEL Function to find out how far the user user_id could get through the chain in an hour window slides.

SELECT
    level,
    count() AS count
FROM
(
    SELECT
        user_id,
        window_funnel(3600000000)(event_timestamp, 
        event_name = 'login', event_name = 'visit', 
        event_name = 'cart', event_name = 'purchase') AS level
    FROM events
    GROUP BY user_id
)
GROUP BY level ORDER BY level ASC;

Learn more:

Changelogs

You can check the changelogs of Databend nightly to learn about our latest developments.

Contributors

Thanks a lot to the contributors for their excellent work this week.

ariesdevilb41shBohuTANGChasen-Zhangdantengskydrmingdrmer
ariesdevilb41shBohuTANGChasen-Zhangdantengskydrmingdrmer
everpcpcfkunerflaneur2020hantmachanyisongjunnplus
everpcpcfkunerflaneur2020hantmachanyisongjunnplus
Kikkonleiyskylichuangmergify[bot]soyeric128sundy-li
Kikkonleiyskylichuangmergify[bot]soyeric128sundy-li
TCeasonXuanwoxudong963ygf11youngsofunZeaLoVe
TCeasonXuanwoxudong963ygf11youngsofunZeaLoVe
zhang2014ZhiHanZzhyassZuoFuhong
zhang2014ZhiHanZzhyassZuoFuhong

Meet Us

Please join the DatafuseLabs Community if you are interested in Databend.

We are looking forward to seeing you try our code. We have a strong team behind you to ensure a smooth experience in trying our code for your projects. If you are a hacker passionate about database internals, feel free to play with our code.

You can submit issues for any problems you find. We also highly appreciate any of your pull requests.