This is an automated email from the ASF dual-hosted git repository.
dongjoon pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/spark-connect-swift.git
The following commit(s) were added to refs/heads/main by this push:
new 88c549e [SPARK-54045] Upgrade `FlatBuffers` to v25.9.23
88c549e is described below
commit 88c549e853fa1a5e7240db51ee6a27bc282dea99
Author: Dongjoon Hyun <[email protected]>
AuthorDate: Mon Oct 27 21:45:49 2025 -0700
[SPARK-54045] Upgrade `FlatBuffers` to v25.9.23
### What changes were proposed in this pull request?
This PR aims to upgrade `FlatBuffers` to `v25.9.23`
### Why are the changes needed?
To bring the latest bug fixes and improvements like `Windows` support.
- https://github.com/google/flatbuffers/releases/tag/v25.9.23 (2025-09-23)
- https://github.com/google/flatbuffers/pull/8484
- https://github.com/google/flatbuffers/pull/8577
- https://github.com/google/flatbuffers/pull/8622
- https://github.com/google/flatbuffers/pull/8637
- https://github.com/google/flatbuffers/pull/8643
- https://github.com/google/flatbuffers/pull/8650
- https://github.com/google/flatbuffers/pull/8649
- https://github.com/google/flatbuffers/pull/8702
### Does this PR introduce _any_ user-facing change?
No. There is no behavior change.
### How was this patch tested?
Pass the CIs.
### Was this patch authored or co-authored using generative AI tooling?
No.
Closes #254 from dongjoon-hyun/SPARK-54045.
Authored-by: Dongjoon Hyun <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
---
Package.swift | 2 +-
README.md | 2 +-
Sources/SparkConnect/ArrowReader.swift | 16 ++++------------
Sources/SparkConnect/Message_generated.swift | 1 +
Sources/SparkConnect/Schema_generated.swift | 1 +
Sources/SparkConnect/SparseTensor_generated.swift | 1 +
6 files changed, 9 insertions(+), 14 deletions(-)
diff --git a/Package.swift b/Package.swift
index dd85d49..9a3edb0 100644
--- a/Package.swift
+++ b/Package.swift
@@ -37,7 +37,7 @@ let package = Package(
.package(url: "https://github.com/grpc/grpc-swift-2.git", exact: "2.1.0"),
.package(url: "https://github.com/grpc/grpc-swift-protobuf.git", exact:
"2.1.1"),
.package(url: "https://github.com/grpc/grpc-swift-nio-transport.git",
exact: "2.2.0"),
- .package(url: "https://github.com/google/flatbuffers.git", branch:
"v25.2.10"),
+ .package(url: "https://github.com/google/flatbuffers.git", branch:
"v25.9.23"),
],
targets: [
.target(
diff --git a/README.md b/README.md
index 9b11adb..f8bb819 100644
--- a/README.md
+++ b/README.md
@@ -21,7 +21,7 @@ So far, this library project is tracking the upstream changes
of [Apache Arrow](
- [gRPC Swift 2.1 (July
2025)](https://github.com/grpc/grpc-swift-2/releases/tag/2.1.0)
- [gRPC Swift Protobuf 2.1 (August
2025)](https://github.com/grpc/grpc-swift-protobuf/releases/tag/2.1.1)
- [gRPC Swift NIO Transport 2.2 (September
2025)](https://github.com/grpc/grpc-swift-nio-transport/releases/tag/2.2.0)
-- [FlatBuffers v25.2.10 (February
2025)](https://github.com/google/flatbuffers/releases/tag/v25.2.10)
+- [FlatBuffers v25.9.23 (September
2025)](https://github.com/google/flatbuffers/releases/tag/v25.9.23)
- [Apache Arrow Swift](https://github.com/apache/arrow-swift)
## How to use in your apps
diff --git a/Sources/SparkConnect/ArrowReader.swift
b/Sources/SparkConnect/ArrowReader.swift
index 218351c..f0699c2 100644
--- a/Sources/SparkConnect/ArrowReader.swift
+++ b/Sources/SparkConnect/ArrowReader.swift
@@ -268,9 +268,7 @@ public class ArrowReader { // swiftlint:disable:this
type_body_length
offset += Int(MemoryLayout<UInt32>.size)
streamData = input[offset...]
- let dataBuffer = ByteBuffer(
- data: streamData,
- allowReadingUnalignedBuffers: true)
+ let dataBuffer = ByteBuffer(data: streamData)
let message = org_apache_arrow_flatbuf_Message.getRootAsMessage(bb:
dataBuffer)
switch message.headerType {
case .recordbatch:
@@ -324,9 +322,7 @@ public class ArrowReader { // swiftlint:disable:this
type_body_length
let result = ArrowReaderResult()
let footerStartOffset = fileData.count - Int(footerLength + 4)
let footerData = fileData[footerStartOffset...]
- let footerBuffer = ByteBuffer(
- data: footerData,
- allowReadingUnalignedBuffers: useUnalignedBuffers)
+ let footerBuffer = ByteBuffer(data: footerData)
let footer = org_apache_arrow_flatbuf_Footer.getRootAsFooter(bb:
footerBuffer)
let schemaResult = loadSchema(footer.schema!)
switch schemaResult {
@@ -356,9 +352,7 @@ public class ArrowReader { // swiftlint:disable:this
type_body_length
recordBatch.offset + (Int64(MemoryLayout<Int32>.size) * messageOffset)
let messageEndOffset = messageStartOffset + Int64(messageLength)
let recordBatchData = fileData[messageStartOffset..<messageEndOffset]
- let mbb = ByteBuffer(
- data: recordBatchData,
- allowReadingUnalignedBuffers: useUnalignedBuffers)
+ let mbb = ByteBuffer(data: recordBatchData)
let message = org_apache_arrow_flatbuf_Message.getRootAsMessage(bb: mbb)
switch message.headerType {
case .recordbatch:
@@ -410,9 +404,7 @@ public class ArrowReader { // swiftlint:disable:this
type_body_length
result: ArrowReaderResult,
useUnalignedBuffers: Bool = false
) -> Result<Void, ArrowError> {
- let mbb = ByteBuffer(
- data: dataHeader,
- allowReadingUnalignedBuffers: useUnalignedBuffers)
+ let mbb = ByteBuffer(data: dataHeader)
let message = org_apache_arrow_flatbuf_Message.getRootAsMessage(bb: mbb)
switch message.headerType {
case .schema:
diff --git a/Sources/SparkConnect/Message_generated.swift
b/Sources/SparkConnect/Message_generated.swift
index 975702c..02a1938 100644
--- a/Sources/SparkConnect/Message_generated.swift
+++ b/Sources/SparkConnect/Message_generated.swift
@@ -20,6 +20,7 @@
// swiftformat:disable all
import FlatBuffers
+import Common
/// @nodoc
public enum org_apache_arrow_flatbuf_CompressionType: Int8, Enum, Verifiable {
diff --git a/Sources/SparkConnect/Schema_generated.swift
b/Sources/SparkConnect/Schema_generated.swift
index e8c69ef..cbda638 100644
--- a/Sources/SparkConnect/Schema_generated.swift
+++ b/Sources/SparkConnect/Schema_generated.swift
@@ -20,6 +20,7 @@
// swiftformat:disable all
import FlatBuffers
+import Common
/// @nodoc
public enum org_apache_arrow_flatbuf_MetadataVersion: Int16, Enum, Verifiable {
diff --git a/Sources/SparkConnect/SparseTensor_generated.swift
b/Sources/SparkConnect/SparseTensor_generated.swift
index 6a181e0..9efdd64 100644
--- a/Sources/SparkConnect/SparseTensor_generated.swift
+++ b/Sources/SparkConnect/SparseTensor_generated.swift
@@ -20,6 +20,7 @@
// swiftformat:disable all
import FlatBuffers
+import Common
/// @nodoc
public enum org_apache_arrow_flatbuf_SparseMatrixCompressedAxis: Int16, Enum,
Verifiable {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]