Increment MetadataVersion in flatbuffer

Change-Id: Id6a5ee0d9c716fcbf92c452b51a249595bc0f90d
This commit is contained in:
Wes McKinney committed 2016-11-28 17:15:11 -05:00
1 parent 844257e1e6
commit 36ab5d6827
5 files changed
+10 -8

No files matched your search

+1 -1
View File
@@ -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;
+1 -2
View File
@@ -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);
+5 -3
View File
@@ -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;
}
}
+1 -1
View File
@@ -42,7 +42,7 @@ class OutputStream;
namespace ipc {
struct MetadataVersion {
enum type { V1_SNAPSHOT };
enum type { V1, V2 };
};
//----------------------------------------------------------------------
+2 -1
View File
@@ -18,7 +18,8 @@
namespace org.apache.arrow.flatbuf;
enum MetadataVersion:short {
V1_SNAPSHOT
V1,
V2
}
/// ----------------------------------------------------------------------