This is an automated email from the ASF dual-hosted git repository.

raulcd pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-swift.git

commit f318f2cfcb33cf5259cf70b69748cff51c0886ac
Author: Dongjoon Hyun <[email protected]>
AuthorDate: Thu May 1 14:45:19 2025 -0700

    GH-46245: [Swift] Upgrade `FlatBuffers` to v25.2.10 (#46246)
    
    ### Rationale for this change
    
    `FlatBuffers` `v24.3.7` was released over one year ago (on Mar 8, 2024), we 
had better use the latest version in order to support `Swift 6+` officially.
    - https://github.com/google/flatbuffers/releases/tag/v25.2.10 (2025-02-11)
        - https://github.com/google/flatbuffers/pull/8414
    - https://github.com/google/flatbuffers/releases/tag/v25.1.24 (2025-01-25)
    - https://github.com/google/flatbuffers/releases/tag/v25.1.21 (2025-01-22)
    - https://github.com/google/flatbuffers/releases/tag/v24.12.23 (2024-12-24)
        - https://github.com/google/flatbuffers/pull/8330
    - https://github.com/google/flatbuffers/releases/tag/v24.3.25 (2024-03-26)
    
    ### What changes are included in this PR?
    
    Use the latest `v25.2.10` instead of `v24.3.7`.
    
    ### Are these changes tested?
    
    Yes.
    
    ### Are there any user-facing changes?
    
    No.
    * GitHub Issue: #46245
    
    Authored-by: Dongjoon Hyun <[email protected]>
    Signed-off-by: Sutou Kouhei <[email protected]>
---
 Arrow/Package.swift                              |  2 +-
 Arrow/Sources/Arrow/File_generated.swift         |  2 +-
 Arrow/Sources/Arrow/Message_generated.swift      |  4 ++--
 Arrow/Sources/Arrow/Schema_generated.swift       |  4 ++--
 Arrow/Sources/Arrow/SparseTensor_generated.swift | 18 +++++++++---------
 Arrow/Sources/Arrow/Tensor_generated.swift       |  2 +-
 6 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/Arrow/Package.swift b/Arrow/Package.swift
index f72ccd2..d9e328f 100644
--- a/Arrow/Package.swift
+++ b/Arrow/Package.swift
@@ -31,7 +31,7 @@ let package = Package(
             targets: ["Arrow"])
     ],
     dependencies: [
-        .package(url: "https://github.com/google/flatbuffers.git";, branch: 
"v24.3.7"),
+        .package(url: "https://github.com/google/flatbuffers.git";, branch: 
"v25.2.10"),
         .package(
               url: "https://github.com/apple/swift-atomics.git";,
               .upToNextMajor(from: "1.2.0") // or `.upToNextMinor
diff --git a/Arrow/Sources/Arrow/File_generated.swift 
b/Arrow/Sources/Arrow/File_generated.swift
index 6817c83..53888e4 100644
--- a/Arrow/Sources/Arrow/File_generated.swift
+++ b/Arrow/Sources/Arrow/File_generated.swift
@@ -104,7 +104,7 @@ public struct org_apache_arrow_flatbuf_Footer: 
FlatBufferObject, Verifiable {
   }
 
   public var version: org_apache_arrow_flatbuf_MetadataVersion { let o = 
_accessor.offset(VTOFFSET.version.v); return o == 0 ? .v1 : 
org_apache_arrow_flatbuf_MetadataVersion(rawValue: _accessor.readBuffer(of: 
Int16.self, at: o)) ?? .v1 }
-  public var schema: org_apache_arrow_flatbuf_Schema? { let o = 
_accessor.offset(VTOFFSET.schema.v); return o == 0 ? nil : 
org_apache_arrow_flatbuf_Schema(_accessor.bb, o: _accessor.indirect(o + 
_accessor.postion)) }
+  public var schema: org_apache_arrow_flatbuf_Schema? { let o = 
_accessor.offset(VTOFFSET.schema.v); return o == 0 ? nil : 
org_apache_arrow_flatbuf_Schema(_accessor.bb, o: _accessor.indirect(o + 
_accessor.position)) }
   public var hasDictionaries: Bool { let o = 
_accessor.offset(VTOFFSET.dictionaries.v); return o == 0 ? false : true }
   public var dictionariesCount: Int32 { let o = 
_accessor.offset(VTOFFSET.dictionaries.v); return o == 0 ? 0 : 
_accessor.vector(count: o) }
   public func dictionaries(at index: Int32) -> org_apache_arrow_flatbuf_Block? 
{ let o = _accessor.offset(VTOFFSET.dictionaries.v); return o == 0 ? nil : 
_accessor.directRead(of: org_apache_arrow_flatbuf_Block.self, offset: 
_accessor.vector(at: o) + index * 24) }
diff --git a/Arrow/Sources/Arrow/Message_generated.swift 
b/Arrow/Sources/Arrow/Message_generated.swift
index 99a3d1a..6820aa1 100644
--- a/Arrow/Sources/Arrow/Message_generated.swift
+++ b/Arrow/Sources/Arrow/Message_generated.swift
@@ -245,7 +245,7 @@ public struct org_apache_arrow_flatbuf_RecordBatch: 
FlatBufferObject, Verifiable
   public func buffers(at index: Int32) -> org_apache_arrow_flatbuf_Buffer? { 
let o = _accessor.offset(VTOFFSET.buffers.v); return o == 0 ? nil : 
_accessor.directRead(of: org_apache_arrow_flatbuf_Buffer.self, offset: 
_accessor.vector(at: o) + index * 16) }
   public func mutableBuffers(at index: Int32) -> 
org_apache_arrow_flatbuf_Buffer_Mutable? { let o = 
_accessor.offset(VTOFFSET.buffers.v); return o == 0 ? nil : 
org_apache_arrow_flatbuf_Buffer_Mutable(_accessor.bb, o: _accessor.vector(at: 
o) + index * 16) }
   ///  Optional compression of the message body
-  public var compression: org_apache_arrow_flatbuf_BodyCompression? { let o = 
_accessor.offset(VTOFFSET.compression.v); return o == 0 ? nil : 
org_apache_arrow_flatbuf_BodyCompression(_accessor.bb, o: _accessor.indirect(o 
+ _accessor.postion)) }
+  public var compression: org_apache_arrow_flatbuf_BodyCompression? { let o = 
_accessor.offset(VTOFFSET.compression.v); return o == 0 ? nil : 
org_apache_arrow_flatbuf_BodyCompression(_accessor.bb, o: _accessor.indirect(o 
+ _accessor.position)) }
   public static func startRecordBatch(_ fbb: inout FlatBufferBuilder) -> 
UOffset { fbb.startTable(with: 4) }
   public static func add(length: Int64, _ fbb: inout FlatBufferBuilder) { 
fbb.add(element: length, def: 0, at: VTOFFSET.length.p) }
   public static func addVectorOf(nodes: Offset, _ fbb: inout 
FlatBufferBuilder) { fbb.add(offset: nodes, at: VTOFFSET.nodes.p) }
@@ -309,7 +309,7 @@ public struct org_apache_arrow_flatbuf_DictionaryBatch: 
FlatBufferObject, Verifi
   }
 
   public var id: Int64 { let o = _accessor.offset(VTOFFSET.id.v); return o == 
0 ? 0 : _accessor.readBuffer(of: Int64.self, at: o) }
-  public var data: org_apache_arrow_flatbuf_RecordBatch? { let o = 
_accessor.offset(VTOFFSET.data.v); return o == 0 ? nil : 
org_apache_arrow_flatbuf_RecordBatch(_accessor.bb, o: _accessor.indirect(o + 
_accessor.postion)) }
+  public var data: org_apache_arrow_flatbuf_RecordBatch? { let o = 
_accessor.offset(VTOFFSET.data.v); return o == 0 ? nil : 
org_apache_arrow_flatbuf_RecordBatch(_accessor.bb, o: _accessor.indirect(o + 
_accessor.position)) }
   ///  If isDelta is true the values in the dictionary are to be appended to a
   ///  dictionary with the indicated id. If isDelta is false this dictionary
   ///  should replace the existing dictionary.
diff --git a/Arrow/Sources/Arrow/Schema_generated.swift 
b/Arrow/Sources/Arrow/Schema_generated.swift
index c6fd6bf..d508444 100644
--- a/Arrow/Sources/Arrow/Schema_generated.swift
+++ b/Arrow/Sources/Arrow/Schema_generated.swift
@@ -1234,7 +1234,7 @@ public struct 
org_apache_arrow_flatbuf_DictionaryEncoding: FlatBufferObject, Ver
   ///  cross-language compatibility and performance, implementations are
   ///  recommended to prefer signed integer types over unsigned integer types
   ///  and to avoid uint64 indices unless they are required by an application.
-  public var indexType: org_apache_arrow_flatbuf_Int? { let o = 
_accessor.offset(VTOFFSET.indexType.v); return o == 0 ? nil : 
org_apache_arrow_flatbuf_Int(_accessor.bb, o: _accessor.indirect(o + 
_accessor.postion)) }
+  public var indexType: org_apache_arrow_flatbuf_Int? { let o = 
_accessor.offset(VTOFFSET.indexType.v); return o == 0 ? nil : 
org_apache_arrow_flatbuf_Int(_accessor.bb, o: _accessor.indirect(o + 
_accessor.position)) }
   ///  By default, dictionaries are not ordered, or the order does not have
   ///  semantic meaning. In some statistical, applications, dictionary-encoding
   ///  is used to represent ordered categorical data, and we provide a way to
@@ -1308,7 +1308,7 @@ public struct org_apache_arrow_flatbuf_Field: 
FlatBufferObject, Verifiable {
   ///  This is the type of the decoded value if the field is dictionary 
encoded.
   public func type<T: FlatbuffersInitializable>(type: T.Type) -> T? { let o = 
_accessor.offset(VTOFFSET.type.v); return o == 0 ? nil : _accessor.union(o) }
   ///  Present only if the field is dictionary encoded.
-  public var dictionary: org_apache_arrow_flatbuf_DictionaryEncoding? { let o 
= _accessor.offset(VTOFFSET.dictionary.v); return o == 0 ? nil : 
org_apache_arrow_flatbuf_DictionaryEncoding(_accessor.bb, o: 
_accessor.indirect(o + _accessor.postion)) }
+  public var dictionary: org_apache_arrow_flatbuf_DictionaryEncoding? { let o 
= _accessor.offset(VTOFFSET.dictionary.v); return o == 0 ? nil : 
org_apache_arrow_flatbuf_DictionaryEncoding(_accessor.bb, o: 
_accessor.indirect(o + _accessor.position)) }
   ///  children apply only to nested data types like Struct, List and Union. 
For
   ///  primitive types children will have length 0.
   public var hasChildren: Bool { let o = 
_accessor.offset(VTOFFSET.children.v); return o == 0 ? false : true }
diff --git a/Arrow/Sources/Arrow/SparseTensor_generated.swift 
b/Arrow/Sources/Arrow/SparseTensor_generated.swift
index e412a61..a2dfbdb 100644
--- a/Arrow/Sources/Arrow/SparseTensor_generated.swift
+++ b/Arrow/Sources/Arrow/SparseTensor_generated.swift
@@ -105,7 +105,7 @@ public struct 
org_apache_arrow_flatbuf_SparseTensorIndexCOO: FlatBufferObject, V
   }
 
   ///  The type of values in indicesBuffer
-  public var indicesType: org_apache_arrow_flatbuf_Int! { let o = 
_accessor.offset(VTOFFSET.indicesType.v); return 
org_apache_arrow_flatbuf_Int(_accessor.bb, o: _accessor.indirect(o + 
_accessor.postion)) }
+  public var indicesType: org_apache_arrow_flatbuf_Int! { let o = 
_accessor.offset(VTOFFSET.indicesType.v); return 
org_apache_arrow_flatbuf_Int(_accessor.bb, o: _accessor.indirect(o + 
_accessor.position)) }
   ///  Non-negative byte offsets to advance one value cell along each dimension
   ///  If omitted, default to row-major order (C-like).
   public var hasIndicesStrides: Bool { let o = 
_accessor.offset(VTOFFSET.indicesStrides.v); return o == 0 ? false : true }
@@ -114,7 +114,7 @@ public struct 
org_apache_arrow_flatbuf_SparseTensorIndexCOO: FlatBufferObject, V
   public var indicesStrides: [Int64] { return _accessor.getVector(at: 
VTOFFSET.indicesStrides.v) ?? [] }
   ///  The location and size of the indices matrix's data
   public var indicesBuffer: org_apache_arrow_flatbuf_Buffer! { let o = 
_accessor.offset(VTOFFSET.indicesBuffer.v); return _accessor.readBuffer(of: 
org_apache_arrow_flatbuf_Buffer.self, at: o) }
-  public var mutableIndicesBuffer: org_apache_arrow_flatbuf_Buffer_Mutable! { 
let o = _accessor.offset(VTOFFSET.indicesBuffer.v); return 
org_apache_arrow_flatbuf_Buffer_Mutable(_accessor.bb, o: o + _accessor.postion) 
}
+  public var mutableIndicesBuffer: org_apache_arrow_flatbuf_Buffer_Mutable! { 
let o = _accessor.offset(VTOFFSET.indicesBuffer.v); return 
org_apache_arrow_flatbuf_Buffer_Mutable(_accessor.bb, o: o + 
_accessor.position) }
   ///  This flag is true if and only if the indices matrix is sorted in
   ///  row-major order, and does not have duplicated entries.
   ///  This sort order is the same as of Tensorflow's SparseTensor,
@@ -178,7 +178,7 @@ public struct 
org_apache_arrow_flatbuf_SparseMatrixIndexCSX: FlatBufferObject, V
   ///  Which axis, row or column, is compressed
   public var compressedAxis: 
org_apache_arrow_flatbuf_SparseMatrixCompressedAxis { let o = 
_accessor.offset(VTOFFSET.compressedAxis.v); return o == 0 ? .row : 
org_apache_arrow_flatbuf_SparseMatrixCompressedAxis(rawValue: 
_accessor.readBuffer(of: Int16.self, at: o)) ?? .row }
   ///  The type of values in indptrBuffer
-  public var indptrType: org_apache_arrow_flatbuf_Int! { let o = 
_accessor.offset(VTOFFSET.indptrType.v); return 
org_apache_arrow_flatbuf_Int(_accessor.bb, o: _accessor.indirect(o + 
_accessor.postion)) }
+  public var indptrType: org_apache_arrow_flatbuf_Int! { let o = 
_accessor.offset(VTOFFSET.indptrType.v); return 
org_apache_arrow_flatbuf_Int(_accessor.bb, o: _accessor.indirect(o + 
_accessor.position)) }
   ///  indptrBuffer stores the location and size of indptr array that
   ///  represents the range of the rows.
   ///  The i-th row spans from `indptr[i]` to `indptr[i+1]` in the data.
@@ -203,9 +203,9 @@ public struct 
org_apache_arrow_flatbuf_SparseMatrixIndexCSX: FlatBufferObject, V
   ///    indptr(X) = [0, 2, 3, 5, 5, 8, 10].
   ///  ```
   public var indptrBuffer: org_apache_arrow_flatbuf_Buffer! { let o = 
_accessor.offset(VTOFFSET.indptrBuffer.v); return _accessor.readBuffer(of: 
org_apache_arrow_flatbuf_Buffer.self, at: o) }
-  public var mutableIndptrBuffer: org_apache_arrow_flatbuf_Buffer_Mutable! { 
let o = _accessor.offset(VTOFFSET.indptrBuffer.v); return 
org_apache_arrow_flatbuf_Buffer_Mutable(_accessor.bb, o: o + _accessor.postion) 
}
+  public var mutableIndptrBuffer: org_apache_arrow_flatbuf_Buffer_Mutable! { 
let o = _accessor.offset(VTOFFSET.indptrBuffer.v); return 
org_apache_arrow_flatbuf_Buffer_Mutable(_accessor.bb, o: o + 
_accessor.position) }
   ///  The type of values in indicesBuffer
-  public var indicesType: org_apache_arrow_flatbuf_Int! { let o = 
_accessor.offset(VTOFFSET.indicesType.v); return 
org_apache_arrow_flatbuf_Int(_accessor.bb, o: _accessor.indirect(o + 
_accessor.postion)) }
+  public var indicesType: org_apache_arrow_flatbuf_Int! { let o = 
_accessor.offset(VTOFFSET.indicesType.v); return 
org_apache_arrow_flatbuf_Int(_accessor.bb, o: _accessor.indirect(o + 
_accessor.position)) }
   ///  indicesBuffer stores the location and size of the array that
   ///  contains the column indices of the corresponding non-zero values.
   ///  The type of index value is long.
@@ -216,7 +216,7 @@ public struct 
org_apache_arrow_flatbuf_SparseMatrixIndexCSX: FlatBufferObject, V
   ///  ```
   ///  Note that the indices are sorted in lexicographical order for each row.
   public var indicesBuffer: org_apache_arrow_flatbuf_Buffer! { let o = 
_accessor.offset(VTOFFSET.indicesBuffer.v); return _accessor.readBuffer(of: 
org_apache_arrow_flatbuf_Buffer.self, at: o) }
-  public var mutableIndicesBuffer: org_apache_arrow_flatbuf_Buffer_Mutable! { 
let o = _accessor.offset(VTOFFSET.indicesBuffer.v); return 
org_apache_arrow_flatbuf_Buffer_Mutable(_accessor.bb, o: o + _accessor.postion) 
}
+  public var mutableIndicesBuffer: org_apache_arrow_flatbuf_Buffer_Mutable! { 
let o = _accessor.offset(VTOFFSET.indicesBuffer.v); return 
org_apache_arrow_flatbuf_Buffer_Mutable(_accessor.bb, o: o + 
_accessor.position) }
   public static func startSparseMatrixIndexCSX(_ fbb: inout FlatBufferBuilder) 
-> UOffset { fbb.startTable(with: 5) }
   public static func add(compressedAxis: 
org_apache_arrow_flatbuf_SparseMatrixCompressedAxis, _ fbb: inout 
FlatBufferBuilder) { fbb.add(element: compressedAxis.rawValue, def: 0, at: 
VTOFFSET.compressedAxis.p) }
   public static func add(indptrType: Offset, _ fbb: inout FlatBufferBuilder) { 
fbb.add(offset: indptrType, at: VTOFFSET.indptrType.p) }
@@ -305,7 +305,7 @@ public struct 
org_apache_arrow_flatbuf_SparseTensorIndexCSF: FlatBufferObject, V
   ///    1 2 0 2   0   0 1 2
   ///  ```
   ///  The type of values in indptrBuffers
-  public var indptrType: org_apache_arrow_flatbuf_Int! { let o = 
_accessor.offset(VTOFFSET.indptrType.v); return 
org_apache_arrow_flatbuf_Int(_accessor.bb, o: _accessor.indirect(o + 
_accessor.postion)) }
+  public var indptrType: org_apache_arrow_flatbuf_Int! { let o = 
_accessor.offset(VTOFFSET.indptrType.v); return 
org_apache_arrow_flatbuf_Int(_accessor.bb, o: _accessor.indirect(o + 
_accessor.position)) }
   ///  indptrBuffers stores the sparsity structure.
   ///  Each two consecutive dimensions in a tensor correspond to a buffer in
   ///  indptrBuffers. A pair of consecutive values at `indptrBuffers[dim][i]`
@@ -325,7 +325,7 @@ public struct 
org_apache_arrow_flatbuf_SparseTensorIndexCSF: FlatBufferObject, V
   public func indptrBuffers(at index: Int32) -> 
org_apache_arrow_flatbuf_Buffer? { let o = 
_accessor.offset(VTOFFSET.indptrBuffers.v); return o == 0 ? nil : 
_accessor.directRead(of: org_apache_arrow_flatbuf_Buffer.self, offset: 
_accessor.vector(at: o) + index * 16) }
   public func mutableIndptrBuffers(at index: Int32) -> 
org_apache_arrow_flatbuf_Buffer_Mutable? { let o = 
_accessor.offset(VTOFFSET.indptrBuffers.v); return o == 0 ? nil : 
org_apache_arrow_flatbuf_Buffer_Mutable(_accessor.bb, o: _accessor.vector(at: 
o) + index * 16) }
   ///  The type of values in indicesBuffers
-  public var indicesType: org_apache_arrow_flatbuf_Int! { let o = 
_accessor.offset(VTOFFSET.indicesType.v); return 
org_apache_arrow_flatbuf_Int(_accessor.bb, o: _accessor.indirect(o + 
_accessor.postion)) }
+  public var indicesType: org_apache_arrow_flatbuf_Int! { let o = 
_accessor.offset(VTOFFSET.indicesType.v); return 
org_apache_arrow_flatbuf_Int(_accessor.bb, o: _accessor.indirect(o + 
_accessor.position)) }
   ///  indicesBuffers stores values of nodes.
   ///  Each tensor dimension corresponds to a buffer in indicesBuffers.
   ///  For example, the indicesBuffers for the above X is:
@@ -431,7 +431,7 @@ public struct org_apache_arrow_flatbuf_SparseTensor: 
FlatBufferObject, Verifiabl
   public func sparseIndex<T: FlatbuffersInitializable>(type: T.Type) -> T! { 
let o = _accessor.offset(VTOFFSET.sparseIndex.v); return _accessor.union(o) }
   ///  The location and size of the tensor's data
   public var data: org_apache_arrow_flatbuf_Buffer! { let o = 
_accessor.offset(VTOFFSET.data.v); return _accessor.readBuffer(of: 
org_apache_arrow_flatbuf_Buffer.self, at: o) }
-  public var mutableData: org_apache_arrow_flatbuf_Buffer_Mutable! { let o = 
_accessor.offset(VTOFFSET.data.v); return 
org_apache_arrow_flatbuf_Buffer_Mutable(_accessor.bb, o: o + _accessor.postion) 
}
+  public var mutableData: org_apache_arrow_flatbuf_Buffer_Mutable! { let o = 
_accessor.offset(VTOFFSET.data.v); return 
org_apache_arrow_flatbuf_Buffer_Mutable(_accessor.bb, o: o + 
_accessor.position) }
   public static func startSparseTensor(_ fbb: inout FlatBufferBuilder) -> 
UOffset { fbb.startTable(with: 7) }
   public static func add(typeType: org_apache_arrow_flatbuf_Type_, _ fbb: 
inout FlatBufferBuilder) { fbb.add(element: typeType.rawValue, def: 0, at: 
VTOFFSET.typeType.p) }
   public static func add(type: Offset, _ fbb: inout FlatBufferBuilder) { 
fbb.add(offset: type, at: VTOFFSET.type.p) }
diff --git a/Arrow/Sources/Arrow/Tensor_generated.swift 
b/Arrow/Sources/Arrow/Tensor_generated.swift
index cd8fd14..e9778d0 100644
--- a/Arrow/Sources/Arrow/Tensor_generated.swift
+++ b/Arrow/Sources/Arrow/Tensor_generated.swift
@@ -107,7 +107,7 @@ public struct org_apache_arrow_flatbuf_Tensor: 
FlatBufferObject, Verifiable {
   public var strides: [Int64] { return _accessor.getVector(at: 
VTOFFSET.strides.v) ?? [] }
   ///  The location and size of the tensor's data
   public var data: org_apache_arrow_flatbuf_Buffer! { let o = 
_accessor.offset(VTOFFSET.data.v); return _accessor.readBuffer(of: 
org_apache_arrow_flatbuf_Buffer.self, at: o) }
-  public var mutableData: org_apache_arrow_flatbuf_Buffer_Mutable! { let o = 
_accessor.offset(VTOFFSET.data.v); return 
org_apache_arrow_flatbuf_Buffer_Mutable(_accessor.bb, o: o + _accessor.postion) 
}
+  public var mutableData: org_apache_arrow_flatbuf_Buffer_Mutable! { let o = 
_accessor.offset(VTOFFSET.data.v); return 
org_apache_arrow_flatbuf_Buffer_Mutable(_accessor.bb, o: o + 
_accessor.position) }
   public static func startTensor(_ fbb: inout FlatBufferBuilder) -> UOffset { 
fbb.startTable(with: 5) }
   public static func add(typeType: org_apache_arrow_flatbuf_Type_, _ fbb: 
inout FlatBufferBuilder) { fbb.add(element: typeType.rawValue, def: 0, at: 
VTOFFSET.typeType.p) }
   public static func add(type: Offset, _ fbb: inout FlatBufferBuilder) { 
fbb.add(offset: type, at: VTOFFSET.type.p) }

Reply via email to