From cda051fae458ba4990381d7144888d33af7bfeb8 Mon Sep 17 00:00:00 2001 From: huangkangping Date: Mon, 10 Jun 2019 10:56:23 +0800 Subject: [PATCH] Add common and options for new format segment --- be/src/olap/rowset/segment_v2/common.h | 28 ++++++++++++++++ be/src/olap/rowset/segment_v2/options.h | 44 +++++++++++++++++++++++++ 2 files changed, 72 insertions(+) create mode 100644 be/src/olap/rowset/segment_v2/common.h create mode 100644 be/src/olap/rowset/segment_v2/options.h diff --git a/be/src/olap/rowset/segment_v2/common.h b/be/src/olap/rowset/segment_v2/common.h new file mode 100644 index 00000000000000..892424c26641c2 --- /dev/null +++ b/be/src/olap/rowset/segment_v2/common.h @@ -0,0 +1,28 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +#pragma once + +namespace doris { + +namespace segment_v2 { + +typedef uint32_t rowid_t; + +} // namespace segment_v2 + +} // namespace doris diff --git a/be/src/olap/rowset/segment_v2/options.h b/be/src/olap/rowset/segment_v2/options.h new file mode 100644 index 00000000000000..3fd26d7a45f318 --- /dev/null +++ b/be/src/olap/rowset/segment_v2/options.h @@ -0,0 +1,44 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +#pragma once + +#include "gen_cpp/segment_v2.pb.h" + +namespace doris { + +namespace segment_v2 { + +struct BuilderOptions { + size_t data_page_size; + + size_t dict_page_size; + + bool write_posidx; + + EncodingTypePB encoding; + + CompressionTypePB compression_type; + + bool is_nullable; + + bool has_dictionary; +}; + +} // namespace segment_v2 + +} // namespace doris