# 双周精选（7.17-7.30）｜Greptime 迎来第二位正式的外部 committer！

Source: https://greptime.cn/blogs/2023-08-02-biweekly

## 内容概述

作为一个成长中的开源项目，GreptimeDB 的进展离不开来自全球的社区贡献者们，感谢各位！

过去两周，我们所有项目中共有 **62** 个 PR 被合并，以下是这段时间较为重要的 PR 总结：

- 支持 ORC 格式的外部表

- PromQL-parser 实现了 prettier 的能力

- 重写了 Release CI，支持多种 GitHub Runner

- 支持 telemetry 功能

- 新增 C++ SDK

## 社区贡献者名单

**特别鸣谢**

在此我们特别感谢 [@NiwakaDev](https://github.com/NiwakaDev)，他不断为我们的项目做出贡献，累计提交了 **13 个 PR** 并都被成功合并！同时过去一个月，他为我们的 issue 提供了超过 **30 条 comments**，并在 Slack 社区与我们进行互动，为我们提供宝贵的建议。因此，他将成为我们**第二位正式的 committer**，再次对他表示感谢与祝贺！

在过去的两周里，共有 **9 位贡献者**，累计 **11 个 PR 被成功合并**，还有很多待合并的 PR。

祝贺以下各位在过去 2 周内成为我们活跃的贡献者：

- [@DevilExileSu](https://github.com/DevilExileSu) ([db#2002](https://github.com/GreptimeTeam/greptimedb/pull/2002))

- [@etolbakov](https://github.com/etolbakov) ([db#1972](https://github.com/GreptimeTeam/greptimedb/pull/1972))

- [@Gump9](https://github.com/Gump9) ([db#1975](https://github.com/GreptimeTeam/greptimedb/pull/1975))

- [@gobraves](https://github.com/gobraves) ([db#1981](https://github.com/GreptimeTeam/greptimedb/pull/1981))

- [@Kree0](https://github.com/Kree0) ([db#1976](https://github.com/GreptimeTeam/greptimedb/pull/1976))

- [@NiwakaDev](https://github.com/NiwakaDev) ([db#1962](https://github.com/GreptimeTeam/greptimedb/pull/1962) [docs#495](https://github.com/GreptimeTeam/docs/pull/495) [docs#502](https://github.com/GreptimeTeam/docs/pull/502))

- [@parkma99](https://github.com/parkma99) ([promqlparser#69](https://github.com/GreptimeTeam/promql-parser/pull/69))

- [@sunray-ley](https://github.com/sunray-ley) ([db#2012](https://github.com/GreptimeTeam/greptimedb/pull/2012))

- [@shawnh2](https://github.com/shawnh2) ([gtctl#103](https://github.com/GreptimeTeam/gtctl/pull/103))

👏 欢迎 [@Kree0](https://github.com/Kree0) 和 [@QuenKar](https://github.com/QuenKar) 作为新的贡献者加入到我们的社区，并都成功合并了首个 PR！

同时衷心感谢我们所有的成员和贡献者！是你们的付出让我们的项目得以成功，也是你们让 GreptimeDB 成为一个更优质的产品。让我们一起努力，建立一个更棒的社区！

## PR 亮点

### [db#1981](https://github.com/GreptimeTeam/greptimedb/pull/1981) 支持 ORC 格式的外部表

我们现在支持了 ORC 格式的外部表，并且可以直接查询本地 ORC 文件。

### [db#69](https://github.com/GreptimeTeam/greptimedb/pull/69) PromQL-parser 实现了 prettier 的能力

PromQL-parser 具有 prettier 的功能，可以以更美观的方式格式化 PromQL 表达式。

### [db#2038](https://github.com/GreptimeTeam/greptimedb/pull/2038) 重写了 Release CI，支持多种 Github Runner

我们重写了 Release CI，以使整个构建流程更简洁，并支持包括 AWS EC2在内的多种 GitHub Runner。原来的 `release.yml` 有以下缺点：

- 所有逻辑都耦合在一个大的 yaml 文件中，很难添加新的 artifact 版本；

- 大量冗余逻辑，总是复制粘贴相同的逻辑；

- 缺乏可重现的构建：原始 `release.yml` 使用交叉编译来构建工件，而不是 Dockerfile；

- 不支持 AWS EC2 使用更大的实例；

新的 `release.yml` 使用[复合动作](https://docs.github.com/en/actions/creating-actions/creating-a-composite-action) 来解耦 `.github/actions/` 中的逻辑，并拆分多个小而清晰的作业来处理发布：

<figure>
<img src="/zh/blogs/2023-08-02-biweekly/image1.png" alt="（图 1：release.yml）" style="width: 80%; margin: 0 auto"/>
<figcaption>（图 1：release.yml）</figcaption>
</figure>

首先，我们需要使用 `allocate-runners` 创建版本（`.github/scripts/create-version.sh`）标签并分配 Runners；

- 所有资源准备就绪后，pipeline 开始构建多个 binary artifact；

- 所有 binary artifact 准备就绪后，pipeline 开始构建和推送 docker 镜像；

- 最后，发布 pipeline 将创建 GitHub Release；

### [db#2007](https://github.com/GreptimeTeam/greptimedb/pull/2007) 支持 telemetry 功能

为了不断优化我们的服务，GreptimeDB 支持收集某些遥测数据，其中包括 GreptimeDB 版本、节点数量、使用的操作系统、环境架构等信息，以及类似的技术细节。不过，为了尊重用户的隐私，我们不会收集任何用户特定数据，包括数据库名称、表名、查询内容等。该功能默认为禁用，用户可以在构建 binary 文件时启用或禁用。

## 新鲜事

### EMQ 新增 [GreptimeDB data bridge 支持](https://github.com/emqx/emqx/pull/11334)

我们将 GreptimeDB 的 data bridge 添加到 emqx 桥接应用程序中，引入了一个新的应用程序 emqx_bridge_greptimedb，包括模式、资源、配置、文档、许可证和测试，还更新了 emqx_bridge_enterprise.erl、mix.exs、emqx_bridge.app.src 和 emqx_bridge.erl 文件，以支持新的桥接类型。同时还添加了用于测试 GreptimeDB 桥接的 docker-compose 和 toxiproxy 文件。

### 新增官方 [C++ SDK](https://github.com/GreptimeTeam/greptimedb-client-cpp)

我们最近发布了 C++ 的 官方 SDK，这样用户或开发者可以更方便在自己 C++ 的应用中集成 GreptimeDB。目前 GreptimeDB 已经支持了 Rust, Java, Golang, C++ 和 Erlang，Python 也在开发中。

## 关于 Greptime

[Greptime 格睿科技](https://greptime.cn/)专注于为可观测、物联网及车联网等领域提供实时、高效的数据存储和分析服务，帮助客户挖掘数据的深层价值。目前基于云原生的时序数据库 [GreptimeDB](https://github.com/GreptimeTeam/greptimedb) 已经衍生出多款适合不同用户的解决方案，更多信息或 demo 展示请联系下方小助手（微信号：greptime）。

欢迎对开源感兴趣的朋友们参与贡献和讨论，从带有 good first issue 标签的 issue 开始你的开源之旅吧～期待在开源社群里遇见你！添加小助手微信即可加入“技术交流群”与志同道合的朋友们面对面交流哦~

Star us on GitHub Now: https://github.com/GreptimeTeam/greptimedb

官网：https://greptime.cn/

文档：https://docs.greptime.cn/

Twitter: https://twitter.com/Greptime

Slack: https://greptime.com/slack

LinkedIn: https://www.linkedin.com/company/greptime/
