You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by al...@apache.org on 2021/06/24 14:55:04 UTC

[arrow-rs] branch cherry_pick_7bea1f66 created (now 36e9a40)

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

alamb pushed a change to branch cherry_pick_7bea1f66
in repository https://gitbox.apache.org/repos/asf/arrow-rs.git.


      at 36e9a40  Bump flatbuffers (#499)

This branch includes the following new commits:

     new 36e9a40  Bump flatbuffers (#499)

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


[arrow-rs] 01/01: Bump flatbuffers (#499)

Posted by al...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

alamb pushed a commit to branch cherry_pick_7bea1f66
in repository https://gitbox.apache.org/repos/asf/arrow-rs.git

commit 36e9a40925bd22ff435ebc914e6193b28ab6ad9e
Author: Chojan Shang <ps...@ritelabs.net>
AuthorDate: Thu Jun 24 22:47:40 2021 +0800

    Bump flatbuffers (#499)
    
    Signed-off-by: Chojan Shang <ps...@outlook.com>
---
 arrow/Cargo.toml                  |  2 +-
 arrow/src/ipc/gen/Message.rs      | 12 ++++++------
 arrow/src/ipc/gen/Schema.rs       | 40 +++++++++++++++++++--------------------
 arrow/src/ipc/gen/SparseTensor.rs |  8 ++++----
 4 files changed, 31 insertions(+), 31 deletions(-)

diff --git a/arrow/Cargo.toml b/arrow/Cargo.toml
index 5d6be46..5db2ea1 100644
--- a/arrow/Cargo.toml
+++ b/arrow/Cargo.toml
@@ -47,7 +47,7 @@ regex = "1.3"
 lazy_static = "1.4"
 packed_simd = { version = "0.3.4", optional = true, package = "packed_simd_2" }
 chrono = "0.4"
-flatbuffers = "=0.8.4"
+flatbuffers = { version = "=2.0.0", optional = true }
 hex = "0.4"
 prettytable-rs = { version = "0.8.0", optional = true }
 lexical-core = "^0.7"
diff --git a/arrow/src/ipc/gen/Message.rs b/arrow/src/ipc/gen/Message.rs
index 7903844..707c62c 100644
--- a/arrow/src/ipc/gen/Message.rs
+++ b/arrow/src/ipc/gen/Message.rs
@@ -76,7 +76,7 @@ impl<'a> flatbuffers::Follow<'a> for CompressionType {
     type Inner = Self;
     #[inline]
     fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
-        let b = flatbuffers::read_scalar_at::<i8>(buf, loc);
+        let b = unsafe { flatbuffers::read_scalar_at::<i8>(buf, loc) };
         Self(b)
     }
 }
@@ -85,7 +85,7 @@ impl flatbuffers::Push for CompressionType {
     type Output = CompressionType;
     #[inline]
     fn push(&self, dst: &mut [u8], _rest: &[u8]) {
-        flatbuffers::emplace_scalar::<i8>(dst, self.0);
+        unsafe { flatbuffers::emplace_scalar::<i8>(dst, self.0) };
     }
 }
 
@@ -173,7 +173,7 @@ impl<'a> flatbuffers::Follow<'a> for BodyCompressionMethod {
     type Inner = Self;
     #[inline]
     fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
-        let b = flatbuffers::read_scalar_at::<i8>(buf, loc);
+        let b = unsafe { flatbuffers::read_scalar_at::<i8>(buf, loc) };
         Self(b)
     }
 }
@@ -182,7 +182,7 @@ impl flatbuffers::Push for BodyCompressionMethod {
     type Output = BodyCompressionMethod;
     #[inline]
     fn push(&self, dst: &mut [u8], _rest: &[u8]) {
-        flatbuffers::emplace_scalar::<i8>(dst, self.0);
+        unsafe { flatbuffers::emplace_scalar::<i8>(dst, self.0) };
     }
 }
 
@@ -292,7 +292,7 @@ impl<'a> flatbuffers::Follow<'a> for MessageHeader {
     type Inner = Self;
     #[inline]
     fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
-        let b = flatbuffers::read_scalar_at::<u8>(buf, loc);
+        let b = unsafe { flatbuffers::read_scalar_at::<u8>(buf, loc) };
         Self(b)
     }
 }
@@ -301,7 +301,7 @@ impl flatbuffers::Push for MessageHeader {
     type Output = MessageHeader;
     #[inline]
     fn push(&self, dst: &mut [u8], _rest: &[u8]) {
-        flatbuffers::emplace_scalar::<u8>(dst, self.0);
+        unsafe { flatbuffers::emplace_scalar::<u8>(dst, self.0) };
     }
 }
 
diff --git a/arrow/src/ipc/gen/Schema.rs b/arrow/src/ipc/gen/Schema.rs
index f37f920..12af5b5 100644
--- a/arrow/src/ipc/gen/Schema.rs
+++ b/arrow/src/ipc/gen/Schema.rs
@@ -96,7 +96,7 @@ impl<'a> flatbuffers::Follow<'a> for MetadataVersion {
     type Inner = Self;
     #[inline]
     fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
-        let b = flatbuffers::read_scalar_at::<i16>(buf, loc);
+        let b = unsafe { flatbuffers::read_scalar_at::<i16>(buf, loc) };
         Self(b)
     }
 }
@@ -105,7 +105,7 @@ impl flatbuffers::Push for MetadataVersion {
     type Output = MetadataVersion;
     #[inline]
     fn push(&self, dst: &mut [u8], _rest: &[u8]) {
-        flatbuffers::emplace_scalar::<i16>(dst, self.0);
+        unsafe { flatbuffers::emplace_scalar::<i16>(dst, self.0) };
     }
 }
 
@@ -217,7 +217,7 @@ impl<'a> flatbuffers::Follow<'a> for Feature {
     type Inner = Self;
     #[inline]
     fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
-        let b = flatbuffers::read_scalar_at::<i64>(buf, loc);
+        let b = unsafe { flatbuffers::read_scalar_at::<i64>(buf, loc) };
         Self(b)
     }
 }
@@ -226,7 +226,7 @@ impl flatbuffers::Push for Feature {
     type Output = Feature;
     #[inline]
     fn push(&self, dst: &mut [u8], _rest: &[u8]) {
-        flatbuffers::emplace_scalar::<i64>(dst, self.0);
+        unsafe { flatbuffers::emplace_scalar::<i64>(dst, self.0) };
     }
 }
 
@@ -305,7 +305,7 @@ impl<'a> flatbuffers::Follow<'a> for UnionMode {
     type Inner = Self;
     #[inline]
     fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
-        let b = flatbuffers::read_scalar_at::<i16>(buf, loc);
+        let b = unsafe { flatbuffers::read_scalar_at::<i16>(buf, loc) };
         Self(b)
     }
 }
@@ -314,7 +314,7 @@ impl flatbuffers::Push for UnionMode {
     type Output = UnionMode;
     #[inline]
     fn push(&self, dst: &mut [u8], _rest: &[u8]) {
-        flatbuffers::emplace_scalar::<i16>(dst, self.0);
+        unsafe { flatbuffers::emplace_scalar::<i16>(dst, self.0) };
     }
 }
 
@@ -396,7 +396,7 @@ impl<'a> flatbuffers::Follow<'a> for Precision {
     type Inner = Self;
     #[inline]
     fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
-        let b = flatbuffers::read_scalar_at::<i16>(buf, loc);
+        let b = unsafe { flatbuffers::read_scalar_at::<i16>(buf, loc) };
         Self(b)
     }
 }
@@ -405,7 +405,7 @@ impl flatbuffers::Push for Precision {
     type Output = Precision;
     #[inline]
     fn push(&self, dst: &mut [u8], _rest: &[u8]) {
-        flatbuffers::emplace_scalar::<i16>(dst, self.0);
+        unsafe { flatbuffers::emplace_scalar::<i16>(dst, self.0) };
     }
 }
 
@@ -484,7 +484,7 @@ impl<'a> flatbuffers::Follow<'a> for DateUnit {
     type Inner = Self;
     #[inline]
     fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
-        let b = flatbuffers::read_scalar_at::<i16>(buf, loc);
+        let b = unsafe { flatbuffers::read_scalar_at::<i16>(buf, loc) };
         Self(b)
     }
 }
@@ -493,7 +493,7 @@ impl flatbuffers::Push for DateUnit {
     type Output = DateUnit;
     #[inline]
     fn push(&self, dst: &mut [u8], _rest: &[u8]) {
-        flatbuffers::emplace_scalar::<i16>(dst, self.0);
+        unsafe { flatbuffers::emplace_scalar::<i16>(dst, self.0) };
     }
 }
 
@@ -586,7 +586,7 @@ impl<'a> flatbuffers::Follow<'a> for TimeUnit {
     type Inner = Self;
     #[inline]
     fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
-        let b = flatbuffers::read_scalar_at::<i16>(buf, loc);
+        let b = unsafe { flatbuffers::read_scalar_at::<i16>(buf, loc) };
         Self(b)
     }
 }
@@ -595,7 +595,7 @@ impl flatbuffers::Push for TimeUnit {
     type Output = TimeUnit;
     #[inline]
     fn push(&self, dst: &mut [u8], _rest: &[u8]) {
-        flatbuffers::emplace_scalar::<i16>(dst, self.0);
+        unsafe { flatbuffers::emplace_scalar::<i16>(dst, self.0) };
     }
 }
 
@@ -675,7 +675,7 @@ impl<'a> flatbuffers::Follow<'a> for IntervalUnit {
     type Inner = Self;
     #[inline]
     fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
-        let b = flatbuffers::read_scalar_at::<i16>(buf, loc);
+        let b = unsafe { flatbuffers::read_scalar_at::<i16>(buf, loc) };
         Self(b)
     }
 }
@@ -684,7 +684,7 @@ impl flatbuffers::Push for IntervalUnit {
     type Output = IntervalUnit;
     #[inline]
     fn push(&self, dst: &mut [u8], _rest: &[u8]) {
-        flatbuffers::emplace_scalar::<i16>(dst, self.0);
+        unsafe { flatbuffers::emplace_scalar::<i16>(dst, self.0) };
     }
 }
 
@@ -853,7 +853,7 @@ impl<'a> flatbuffers::Follow<'a> for Type {
     type Inner = Self;
     #[inline]
     fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
-        let b = flatbuffers::read_scalar_at::<u8>(buf, loc);
+        let b = unsafe { flatbuffers::read_scalar_at::<u8>(buf, loc) };
         Self(b)
     }
 }
@@ -862,7 +862,7 @@ impl flatbuffers::Push for Type {
     type Output = Type;
     #[inline]
     fn push(&self, dst: &mut [u8], _rest: &[u8]) {
-        flatbuffers::emplace_scalar::<u8>(dst, self.0);
+        unsafe { flatbuffers::emplace_scalar::<u8>(dst, self.0) };
     }
 }
 
@@ -944,7 +944,7 @@ impl<'a> flatbuffers::Follow<'a> for DictionaryKind {
     type Inner = Self;
     #[inline]
     fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
-        let b = flatbuffers::read_scalar_at::<i16>(buf, loc);
+        let b = unsafe { flatbuffers::read_scalar_at::<i16>(buf, loc) };
         Self(b)
     }
 }
@@ -953,7 +953,7 @@ impl flatbuffers::Push for DictionaryKind {
     type Output = DictionaryKind;
     #[inline]
     fn push(&self, dst: &mut [u8], _rest: &[u8]) {
-        flatbuffers::emplace_scalar::<i16>(dst, self.0);
+        unsafe { flatbuffers::emplace_scalar::<i16>(dst, self.0) };
     }
 }
 
@@ -1034,7 +1034,7 @@ impl<'a> flatbuffers::Follow<'a> for Endianness {
     type Inner = Self;
     #[inline]
     fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
-        let b = flatbuffers::read_scalar_at::<i16>(buf, loc);
+        let b = unsafe { flatbuffers::read_scalar_at::<i16>(buf, loc) };
         Self(b)
     }
 }
@@ -1043,7 +1043,7 @@ impl flatbuffers::Push for Endianness {
     type Output = Endianness;
     #[inline]
     fn push(&self, dst: &mut [u8], _rest: &[u8]) {
-        flatbuffers::emplace_scalar::<i16>(dst, self.0);
+        unsafe { flatbuffers::emplace_scalar::<i16>(dst, self.0) };
     }
 }
 
diff --git a/arrow/src/ipc/gen/SparseTensor.rs b/arrow/src/ipc/gen/SparseTensor.rs
index 5d12d4e..986d21c 100644
--- a/arrow/src/ipc/gen/SparseTensor.rs
+++ b/arrow/src/ipc/gen/SparseTensor.rs
@@ -77,7 +77,7 @@ impl<'a> flatbuffers::Follow<'a> for SparseMatrixCompressedAxis {
     type Inner = Self;
     #[inline]
     fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
-        let b = flatbuffers::read_scalar_at::<i16>(buf, loc);
+        let b = unsafe { flatbuffers::read_scalar_at::<i16>(buf, loc) };
         Self(b)
     }
 }
@@ -86,7 +86,7 @@ impl flatbuffers::Push for SparseMatrixCompressedAxis {
     type Output = SparseMatrixCompressedAxis;
     #[inline]
     fn push(&self, dst: &mut [u8], _rest: &[u8]) {
-        flatbuffers::emplace_scalar::<i16>(dst, self.0);
+        unsafe { flatbuffers::emplace_scalar::<i16>(dst, self.0) };
     }
 }
 
@@ -180,7 +180,7 @@ impl<'a> flatbuffers::Follow<'a> for SparseTensorIndex {
     type Inner = Self;
     #[inline]
     fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
-        let b = flatbuffers::read_scalar_at::<u8>(buf, loc);
+        let b = unsafe { flatbuffers::read_scalar_at::<u8>(buf, loc) };
         Self(b)
     }
 }
@@ -189,7 +189,7 @@ impl flatbuffers::Push for SparseTensorIndex {
     type Output = SparseTensorIndex;
     #[inline]
     fn push(&self, dst: &mut [u8], _rest: &[u8]) {
-        flatbuffers::emplace_scalar::<u8>(dst, self.0);
+        unsafe { flatbuffers::emplace_scalar::<u8>(dst, self.0) };
     }
 }