< 返回版块

lllhuaer 发表于 2022-01-07 09:48

Databend aimed to be an open source elastic and reliable cloud 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

Improvement

Performance Improvement

  • improve performance of arithmetic plus functions by @zhyass (#3615)

Bug fixes

Tips

Let's learn a weekly tip from Databend.

Have fun with Databend UDF (User Defined Function)

In the last week we have introduced an experimental UDF engine, thanks @lianghanzhen. Let's try it out together.

Create a UDF

Databend supports the use of expressions as user defined functions. We can easily create a user-defined function in lambda-like style with CREATE FUNCTION <fn-name> AS (<fn-param0>, ...) -> <fn-expr>. Let's create a custom function to calculate the mean of two numbers together.

mysql> CREATE FUNCTION mean2number AS (x, y) -> (x + y) / 2;
Query OK, 0 rows affected (0.05 sec)
Read 0 rows, 0 B in 0.037 sec., 0 rows/sec., 0 B/sec.

Call a UDF

Calling UDF is the same as calling any other function. In the following example we have calculated the mean of 150 and 250.

mysql> SELECT mean2number(150, 250);
+-------------------+
| ((150 + 250) / 2) |
+-------------------+
|               200 |
+-------------------+
1 row in set (0.02 sec)
Read 1 rows, 1 B in 0.018 sec., 55.59 rows/sec., 55.59 B/sec.

Changlogs

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

Ecosystem/Upstream

From open source, for open source. Our team is also committed to contributing to the Rust ecosystem and upstream dependencies.

  • datafuselabs/openraft: An implementation of the Raft distributed consensus protocol using the Tokio framework. The async-raft fork, maintained by the databend team, fixes serious bugs.

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.

评论区

写评论

还没有评论

1 共 0 条评论, 1 页