---
title: Databend 开源周报第 70 期
description: Databend 开源周报第 70 期
slug: category-weekly/databend-weekly-70
date: 2022-12-06
tags: [weekly]
category: Weekly

image: databend-weekly.png
authors:
  - DatabendLabs
---

> 英文版移步：https://www.databend.com/blog/2022-11-30-databend-weekly

[Databend](https://github.com/databendlabs/databend) 是一款强大的云数仓。专为弹性和高效设计。自由且开源。即刻体验云服务：[https://app.databend.cn](https://app.databend.cn) 。

{/* truncate */}

## What's New

探索 Databend 本周新进展，遇到更贴近你心意的 Databend。

### Features & Improvements ✨

**Format**

- 更好地检查格式相关选项 ([#8981](https://github.com/databendlabs/databend/pull/8981))

- 为 Parquet 文件提供基本的模式推断能力 ([#9043](https://github.com/databendlabs/databend/pull/9043))

**Query**

- QualifiedName 支持 'db.table._'_ 和 _'table._' ([#8965](https://github.com/databendlabs/databend/pull/8965))

- 支持批量插入时关闭表达式解析 ([#8966](https://github.com/databendlabs/databend/pull/8966))

**Storage**

- 为 fuse engine 增加 cache layer ([#8830](https://github.com/databendlabs/databend/pull/8830))

- 新增 system 表 system.memory_statistics ([#8945](https://github.com/databendlabs/databend/pull/8945))

- 新增 `optimize table table_name statistic` 支持，用于计算表统计信息 ([#8891](https://github.com/databendlabs/databend/pull/8891))

### Code Refactoring 🎉

**Base**

- 移除 common-macros ([#8936](https://github.com/databendlabs/databend/pull/8936))

**Format**

- TypeDeserializer 中去除 FormatSetting ([#8950](https://github.com/databendlabs/databend/pull/8950))

**Planner**

- 重构 `ExtractOrPredicate` ，合并到 `RulePushDownFilterJoin`([#8951](https://github.com/databendlabs/databend/pull/8951))

**Processors**

- 合并构建数据块来优化 join ([#8961](https://github.com/databendlabs/databend/pull/8961))

**New Expression**

- 使用新方法重做 [#8789](https://github.com/databendlabs/databend/pull/8789) ([#9008](https://github.com/databendlabs/databend/pull/9008))

### Documentation 📔

- 使用 Crowdin 提供 i18n 支持 ([#8987](https://github.com/databendlabs/databend/pull/8987), [#8997](https://github.com/databendlabs/databend/pull/8997), etc.)

### Bug Fixes 🔧

**Base**

- 修复 memory tracker 丢失的问题 ([#8932](https://github.com/databendlabs/databend/pull/8932))

**Meta**

- 修复 share db 漏洞，如果需要则创建 `DatabaseIdToName` ([#9006](https://github.com/databendlabs/databend/pull/9006))

**Mysql handler**

- 修复 MySQL 连接泄漏 ([#8894](https://github.com/databendlabs/databend/pull/8894))

**Processors**

- 修复 `update_list` 中的内存泄漏 ([#9023](https://github.com/databendlabs/databend/pull/9023))

**Storage**

- 压缩时并行读写数据块 ([#8921](https://github.com/databendlabs/databend/pull/8921))

## What's On In Databend

请持续关注 Databend 的最新动态。

#### Infer Schema 前瞻

通常，在从 stage 或者其他位置载入数据时，我们需要先创建对应的表。但有些时候，我们无法预知文件模式或者需要创建的模式太复杂，使得无法轻松完成创建表的工作。

引入模式推断将会简化从文件载入数据的过程。甚至，可以直接使用 SELECT 语句查询 stage 中的数据，例如 `select * from @my_stage` 。

```SQL
INFER 's3://mybucket/data.csv' FILE_FORMAT = ( TYPE = CSV );
+-------------+---------+----------+
| COLUMN_NAME | TYPE    | NULLABLE |
|-------------+---------+----------|
| CONTINENT   | TEXT    | True     |
| COUNTRY     | VARIANT | True     |
+-------------+---------+----------+
```

在 [#9043](https://github.com/databendlabs/databend/pull/9043) 中，Databend 新增对 parquet 文件进行基本模式推断的接口，我们将会在这个基础上继续推动 [#7211](https://github.com/databendlabs/databend/issues/7211) 的解决，以支持 `select * from @stage` 。

**阅读以下材料以了解更多讯息：**

- [PR | add basic schema infer for parquet](https://github.com/databendlabs/databend/pull/9043)

- [Issue | query data from S3 location or stage](https://github.com/databendlabs/databend/pull/7211)

- [PR | rfc: Infer Schema](https://github.com/databendlabs/databend/pull/8645)

## What's Up Next

我们始终对前沿技术和创新理念持开放态度，欢迎您加入社区，为 Databend 注入活力。

#### 为 MySQL Handler 添加 TLS 支持

近期发布的 [opensrv-mysql v0.3.0](https://github.com/databendlabs/opensrv/discussions/35) 引入了 TLS 支持，是时候为 Databend 的 MySQL Handler 实现它。

```Rust
let (is_ssl, init_params) = opensrv_mysql::AsyncMysqlIntermediary::init_before_ssl(
      &mut shim,
      &mut r,
      &mut w,
      &Some(tls_config.clone()),
    )
    .await
    .unwrap();

opensrv_mysql::secure_run_with_options(shim, w, ops, tls_config, init_params).await
```

[Issue 8983: Feature: tls support for mysql handler](https://github.com/databendlabs/databend/issues/8983)

如果你对这个主题感兴趣，可以尝试解决其中的部分问题或者参与讨论和 PR review。或者，你可以点击 https://link.databend.com/i-m-feeling-lucky 来挑选一个随机问题，祝好运！

## Changelogs

前往查看 Databend 每日构建的变更日志，以了解开发的最新动态。

地址：https://github.com/databendlabs/databend/releases

## Contributors

非常感谢贡献者们在本周的卓越工作。

![](../static/img/blog/weekly-70-1.png)
![](../static/img/blog/weekly-70-2.png)
![](../static/img/blog/weekly-70-3.png)
![](../static/img/blog/weekly-70-4.png)

## Connect With Us

Databend 是一款开源、弹性、低成本，基于对象存储也可以做实时分析的新式数仓。期待您的关注，一起探索云原生数仓解决方案，打造新一代开源 Data Cloud。

- [Databend Website](https://docs.databend.cn/)

- [GitHub Discussions](https://github.com/databendlabs/databend/discussions)

- [Twitter](https://twitter.com/Datafuse_Labs)

- [Slack Channel](https://link.databend.com/join-slack)
