mirror of
https://github.com/apache/arrow.git
synced 2026-10-29 17:15:39 +08:00
Increment MetadataVersion in flatbuffer
Change-Id: Id6a5ee0d9c716fcbf92c452b51a249595bc0f90d
This commit is contained in:
1 parent
844257e1e6
commit
36ab5d6827
5 files changed
+10
-8
No files matched your search
@@ -111,7 +111,7 @@ class TestFileFooter : public ::testing::Test {
|
||||
std::unique_ptr<FileFooter> footer;
|
||||
ASSERT_OK(FileFooter::Open(buffer, &footer));
|
||||
|
||||
ASSERT_EQ(MetadataVersion::V1_SNAPSHOT, footer->version());
|
||||
ASSERT_EQ(MetadataVersion::V2, footer->version());
|
||||
|
||||
// Check schema
|
||||
std::shared_ptr<Schema> schema2;
|
||||
|
||||
@@ -44,8 +44,7 @@ using FieldOffset = flatbuffers::Offset<arrow::flatbuf::Field>;
|
||||
using VectorLayoutOffset = flatbuffers::Offset<arrow::flatbuf::VectorLayout>;
|
||||
using Offset = flatbuffers::Offset<void>;
|
||||
|
||||
static constexpr flatbuf::MetadataVersion kMetadataVersion =
|
||||
flatbuf::MetadataVersion_V1_SNAPSHOT;
|
||||
static constexpr flatbuf::MetadataVersion kMetadataVersion = flatbuf::MetadataVersion_V2;
|
||||
|
||||
Status FieldFromFlatbuffer(const flatbuf::Field* field, std::shared_ptr<Field>* out);
|
||||
|
||||
|
||||
@@ -281,11 +281,13 @@ class FileFooter::FileFooterImpl {
|
||||
|
||||
MetadataVersion::type version() const {
|
||||
switch (footer_->version()) {
|
||||
case flatbuf::MetadataVersion_V1_SNAPSHOT:
|
||||
return MetadataVersion::V1_SNAPSHOT;
|
||||
case flatbuf::MetadataVersion_V1:
|
||||
return MetadataVersion::V1;
|
||||
case flatbuf::MetadataVersion_V2:
|
||||
return MetadataVersion::V2;
|
||||
// Add cases as other versions become available
|
||||
default:
|
||||
return MetadataVersion::V1_SNAPSHOT;
|
||||
return MetadataVersion::V2;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ class OutputStream;
|
||||
namespace ipc {
|
||||
|
||||
struct MetadataVersion {
|
||||
enum type { V1_SNAPSHOT };
|
||||
enum type { V1, V2 };
|
||||
};
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
+2
-1
@@ -18,7 +18,8 @@
|
||||
namespace org.apache.arrow.flatbuf;
|
||||
|
||||
enum MetadataVersion:short {
|
||||
V1_SNAPSHOT
|
||||
V1,
|
||||
V2
|
||||
}
|
||||
|
||||
/// ----------------------------------------------------------------------
|
||||
|
||||
Reference in new issue
Block a user