<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Union on Tony Bai</title><link>https://tonybai.com/tags/union/</link><description>Recent content in Union on Tony Bai</description><generator>Hugo</generator><language>zh-cn</language><copyright>2004-2026 Tony Bai. 版权所有.</copyright><lastBuildDate>Mon, 29 Dec 2025 00:00:00 +0800</lastBuildDate><atom:link href="https://tonybai.com/tags/union/index.xml" rel="self" type="application/rss+xml"/><item><title>告别 interface{} 模拟，Go 终于要有真正的 Union 类型了？</title><link>https://tonybai.com/2025/12/29/go-community-new-sum-type-end-interface-union-types/</link><pubDate>Mon, 29 Dec 2025 00:00:00 +0800</pubDate><guid>https://tonybai.com/2025/12/29/go-community-new-sum-type-end-interface-union-types/</guid><description>本文永久链接 – https://tonybai.com/2025/12/29/go-community-new-sum-type-end-interface-union-types 大家好，我是Tony Bai。 &amp;gt; “Go 什么时候支持枚举？” &amp;gt; &amp;gt; “Go 什么时候有真正的联合类型？” 这可能是 Go 语言诞生以来，被问得最多的问题之一。现有的解决方案——无论是用 const 模拟枚举，还...</description></item><item><title>关系代数、SQL语句和Go语言示例</title><link>https://tonybai.com/2023/11/15/relational-algebra-and-sql-with-go-examples/</link><pubDate>Wed, 15 Nov 2023 00:00:00 +0800</pubDate><guid>https://tonybai.com/2023/11/15/relational-algebra-and-sql-with-go-examples/</guid><description>本文永久链接 – https://tonybai.com/2023/11/15/relational-algebra-and-sql-with-go-examples 近些年，数据库领域发展日新月异，除传统的关系型数据库外，还出现了许多新型的数据库，比如：以HBase、Cassandra、MongoDB为代表的NoSQL数据库，以InfluxDB、TDEngine为代表的时序数据库，以Neo4J、...</description></item><item><title>Go语言开发者的Apache Arrow使用指南：读写Parquet文件</title><link>https://tonybai.com/2023/07/31/a-guide-of-using-apache-arrow-for-gopher-part6/</link><pubDate>Mon, 31 Jul 2023 00:00:00 +0800</pubDate><guid>https://tonybai.com/2023/07/31/a-guide-of-using-apache-arrow-for-gopher-part6/</guid><description>本文永久链接 – https://tonybai.com/2023/07/31/a-guide-of-using-apache-arrow-for-gopher-part6 Apache Arrow是一种开放的、与语言无关的列式内存格式，在本系列文章的前几篇中，我们都聚焦于内存表示与内存操作。 但对于一个数据库系统或大数据分析平台来说，数据不能也无法一直放在内存中，虽说目前内存很大也足够便宜了，但...</description></item><item><title>Go语言开发者的Apache Arrow使用指南：扩展compute包</title><link>https://tonybai.com/2023/07/22/a-guide-of-using-apache-arrow-for-gopher-part5/</link><pubDate>Sat, 22 Jul 2023 00:00:00 +0800</pubDate><guid>https://tonybai.com/2023/07/22/a-guide-of-using-apache-arrow-for-gopher-part5/</guid><description>本文永久链接 – https://tonybai.com/2023/07/22/a-guide-of-using-apache-arrow-for-gopher-part5 在本系列文章的第4篇《Go语言开发者的Apache Arrow使用指南：数据操作》中我们遇到了**大麻烦**：Go的Arrow实现居然不支持像max、min、sum这样的简单聚合计算函数:(，分组聚合(grouped aggr...</description></item><item><title>Go语言开发者的Apache Arrow使用指南：数据操作</title><link>https://tonybai.com/2023/07/13/a-guide-of-using-apache-arrow-for-gopher-part4/</link><pubDate>Thu, 13 Jul 2023 00:00:00 +0800</pubDate><guid>https://tonybai.com/2023/07/13/a-guide-of-using-apache-arrow-for-gopher-part4/</guid><description>本文永久链接 – https://tonybai.com/2023/07/13/a-guide-of-using-apache-arrow-for-gopher-part4 在前面的Arrow系列文章中，我们介绍了Arrow的基础数据类型以及高级数据类型，这让我们具备了在内存中建立起一个immutable数据集的能力。但这并非我们的目标，我们最终是要对建立起来的数据集进行查询和分析等操作(mani...</description></item><item><title>Go语言开发者的Apache Arrow使用指南：高级数据结构</title><link>https://tonybai.com/2023/07/08/a-guide-of-using-apache-arrow-for-gopher-part3/</link><pubDate>Sat, 08 Jul 2023 00:00:00 +0800</pubDate><guid>https://tonybai.com/2023/07/08/a-guide-of-using-apache-arrow-for-gopher-part3/</guid><description>本文永久链接 – https://tonybai.com/2023/07/08/a-guide-of-using-apache-arrow-for-gopher-part3 经过对前面两篇文章《Arrow数据类型》和《Arrow Go实现的内存管理》的学习，我们知道了各种Arrow array type以及它们在内存中的layout，我们了解了Go arrow实现在内存管理上的一些机制和使用原则。...</description></item><item><title>Go语言开发者的Apache Arrow使用指南：内存管理</title><link>https://tonybai.com/2023/06/30/a-guide-of-using-apache-arrow-for-gopher-part2/</link><pubDate>Fri, 30 Jun 2023 00:00:00 +0800</pubDate><guid>https://tonybai.com/2023/06/30/a-guide-of-using-apache-arrow-for-gopher-part2/</guid><description>本文永久链接 – https://tonybai.com/2023/06/30/a-guide-of-using-apache-arrow-for-gopher-part2 如果你看了上一篇《Go语言开发者的Apache Arrow使用指南：数据类型》中的诸多Go操作arrow的代码示例，你很可能会被代码中大量使用的Retain和Release方法搞晕。不光大家有这样的感觉，我也有同样的feeli...</description></item><item><title>Go语言开发者的Apache Arrow使用指南：数据类型</title><link>https://tonybai.com/2023/06/25/a-guide-of-using-apache-arrow-for-gopher-part1/</link><pubDate>Sun, 25 Jun 2023 00:00:00 +0800</pubDate><guid>https://tonybai.com/2023/06/25/a-guide-of-using-apache-arrow-for-gopher-part1/</guid><description>本文永久链接 – https://tonybai.com/2023/06/25/a-guide-of-using-apache-arrow-for-gopher-part1 如果你不是做大数据分析的，提到Arrow这个词，你可能会以为我要聊聊那个箭牌卫浴或是箭牌口香糖(注：其实箭牌口香糖使用的单词并非Arrow)。其实我要聊的是Apache的一个顶级项目：Arrow。 为什么要聊这个项目呢？说来话...</description></item><item><title>Go类型系统：有何与众不同</title><link>https://tonybai.com/2022/12/18/go-type-system/</link><pubDate>Sun, 18 Dec 2022 00:00:00 +0800</pubDate><guid>https://tonybai.com/2022/12/18/go-type-system/</guid><description>本文永久链接 – https://tonybai.com/2022/12/18/go-type-system Go是一门强类型的静态编程语言。使用Go编程，我们的每一行代码几乎都离不开**类型**。因此，深入学习Go，我们首先要对Go的类型系统(type system)有一个全面和深入的认知。Go类型系统可以给予我们一个全局整体的视角，以帮助我们更好地学习和理解Go语言中那些具体的与类型相关的内容...</description></item><item><title>《Understanding and Using C Pointers》要点先睹为快</title><link>https://tonybai.com/2013/05/28/understanding-and-using-c-pointers-keypoint-preview/</link><pubDate>Tue, 28 May 2013 00:00:00 +0800</pubDate><guid>https://tonybai.com/2013/05/28/understanding-and-using-c-pointers-keypoint-preview/</guid><description>_如果你问十个C程序员：你觉得C语言的核心是什么？这十个程序员都会回答：指针。_ 指针具备成为C语言核心的两个关键要素：**强大**与**争议**。 \* **指针的强大**源自于其天生与机器内存模型的适配。使用指针让代码紧凑，并可获得仅次于汇编代码的执行效率；使用指针可以让C程 序员毫不费力地尽情操纵着内存中的每个byte甚至是bit；使用指针可以为C程序员提供无与伦比的操作灵活性。总之，在C语...</description></item><item><title>Go与C语言的互操作</title><link>https://tonybai.com/2012/09/26/interoperability-between-go-and-c/</link><pubDate>Wed, 26 Sep 2012 00:00:00 +0800</pubDate><guid>https://tonybai.com/2012/09/26/interoperability-between-go-and-c/</guid><description>Go有强烈的C背景，除了语法具有继承性外，其设计者以及其设计目标都与C语言有着千丝万缕的联系。在Go与C语言互操作(Interoperability)方面，Go更是提供了强大的支持。尤其是在Go中使用C，你甚至可以直接在Go源文件中编写C代码，这是其他语言所无法望其项背的。 在如下一些场景中，可能会涉及到Go与C的互操作： 1、提升局部代码性能时，用C替换一些Go代码。C之于Go，好比汇编之于C。...</description></item></channel></rss>