--- title: 'This Week in Databend #140' date: 2024-04-15 slug: category-weekly/2024-04-15-databend-weekly cover_url: 'weekly/weekly-140.jpg' image: 'weekly/weekly-140.jpg' tags: [weekly] category: Weekly description: 'Stay up to date with the latest weekly developments on Databend!' contributors: - name: andylokandy - name: ariesdevil - name: BohuTANG - name: Dousir9 - name: dqhl76 - name: drmingdrmer - name: everpcpc - name: flaneur2020 - name: hantmac - name: kkk25641463 - name: PsiACE - name: soyeric128 - name: sundy-li - name: TCeason - name: TracyZYJ - name: Xuanwo - name: xudong963 - name: youngsofun - name: zhang2014 authors: - PsiACE --- [Databend](https://github.com/databendlabs/databend) is a modern cloud data warehouse, serving your massive-scale analytics needs at low cost and complexity. Open source alternative to Snowflake. Also available in the cloud: [https://app.databend.com](https://app.databend.com) . ## What's New Stay informed about the latest features of Databend. ### Supporting `EXECUTE IMMEDIATE` Databend has now incorporated `EXECUTE IMMEDIATE`, enabling users to execute complex SQL logic within a single statement for more flexible SQL handling capabilities. {/* truncate */} ```sql EXECUTE IMMEDIATE $$ BEGIN LET x := 1; LET y := x + 1; LET z RESULTSET := SELECT :y + 1; RETURN TABLE(z); END; $$; ---- ┌───────┐ │ 2 + 1 │ │ UInt8 │ ├───────┤ │ 3 │ └───────┘ ``` This feature enhances Databend's ability to support more data processing scenarios and advances our efforts in supporting stored procedures and SQL scripting. Welcome to join in the development and iteration of these features. If you would like to learn more, please contact the [Databend team](https://databend.com/contact-us/) or refer to the resources listed below: - [PR #15144 | feat: add EXECUTE IMMEDIATE statement ](https://github.com/databendlabs/databend/pull/15144) - [Issue #14904 | Feature: Stored procedure and SQL Scripting](https://github.com/databendlabs/databend/issues/14904) ## Code Corner Discover some fascinating code snippets or projects that showcase our work or learning journey. ### Blog: Towards Efficient Distributed Group Aggregation Group aggregation is widely used for large-scale data analysis (OLAP). Unlike regular `SELECT` queries , it changes the cardinality of result. Databend recently improved its data processing capabilities by implementing a new aggregation hash table inspired by DuckDB. This update enhances group aggregation performance significantly in both standalone and distributed environments. ![Alt text](../static/img/blog/towards-efficient-distributed-group-aggregation/workflow.PNG) [Blog | Towards Efficient Distributed Group Aggregation](https://www.databend.com/blog/2024-04-12-towards-efficient-distributed-group-aggregation.md/) ## Highlights We have also made these improvements to Databend that we hope you will find helpful: - Added support for geographic information functions `ST_GEOMPOINTFROMGEOHASH` and `ST_MAKEPOLYGON`. - Added support for changing table comments. - Added support for offsets in time travel. - Read the documentation [Docs | Full-Text Index](https://docs.databend.com/guides/performance/fulltext-index) to learn about Databend's full-text index. ## What's Up Next We're always open to cutting-edge technologies and innovative ideas. You're more than welcome to join the community and bring them to Databend. ### Adding Query Digest to `query_log` A query digest is a summary of a query, and if two queries have the same digest, it means they share the same pattern. These two query digests are the same: ```sql SELECT id FROM t1 WHERE name = 'a'; SELECT id FROM t1 WHERE name = 'b'; ``` We can determine which query pattern takes more time by examining their respective digests. [Issue #15164 | feat: add query digest to query_log](https://github.com/databendlabs/databend/issues/15164) Please let us know if you're interested in contributing to this feature, or pick up a good first issue at [https://link.databend.com/i-m-feeling-lucky](https://link.databend.com/i-m-feeling-lucky) to get started. ## Changelog You can check the changelog of Databend Nightly for details about our latest developments. **Full Changelog**: [https://github.com/databendlabs/databend/compare/v1.2.408-nightly...v1.2.420-nightly](https://github.com/databendlabs/databend/compare/v1.2.408-nightly...v1.2.420-nightly)