feat: add InvertedIndexMetas (#121)
* feat: add `InvertedIndexFooter` Signed-off-by: Zhenchi <zhongzc_arch@outlook.com> * feat: map instead of list Signed-off-by: Zhenchi <zhongzc_arch@outlook.com> * fix: add rust mod Signed-off-by: Zhenchi <zhongzc_arch@outlook.com> * chore: rename InvertedIndexFooter to InvertedIndexMetas Signed-off-by: Zhenchi <zhongzc_arch@outlook.com> * chore: add java outer classname option Signed-off-by: Zhenchi <zhongzc_arch@outlook.com> --------- Signed-off-by: Zhenchi <zhongzc_arch@outlook.com>
This commit is contained in:
@@ -43,6 +43,7 @@ fn main() {
|
|||||||
"proto/greptime/v1/meta/lock.proto",
|
"proto/greptime/v1/meta/lock.proto",
|
||||||
"proto/greptime/v1/meta/cluster.proto",
|
"proto/greptime/v1/meta/cluster.proto",
|
||||||
"proto/greptime/v1/region/server.proto",
|
"proto/greptime/v1/region/server.proto",
|
||||||
|
"proto/greptime/v1/index/inverted_index.proto",
|
||||||
"proto/prometheus/remote/remote.proto",
|
"proto/prometheus/remote/remote.proto",
|
||||||
"proto/substrait_extension/promql_plan.proto",
|
"proto/substrait_extension/promql_plan.proto",
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -0,0 +1,29 @@
|
|||||||
|
// Generated by the gRPC C++ plugin.
|
||||||
|
// If you make any local change, they will be lost.
|
||||||
|
// source: greptime/v1/index/inverted_index.proto
|
||||||
|
|
||||||
|
#include "greptime/v1/index/inverted_index.pb.h"
|
||||||
|
#include "greptime/v1/index/inverted_index.grpc.pb.h"
|
||||||
|
|
||||||
|
#include <functional>
|
||||||
|
#include <grpcpp/support/async_stream.h>
|
||||||
|
#include <grpcpp/support/async_unary_call.h>
|
||||||
|
#include <grpcpp/impl/channel_interface.h>
|
||||||
|
#include <grpcpp/impl/client_unary_call.h>
|
||||||
|
#include <grpcpp/support/client_callback.h>
|
||||||
|
#include <grpcpp/support/message_allocator.h>
|
||||||
|
#include <grpcpp/support/method_handler.h>
|
||||||
|
#include <grpcpp/impl/rpc_service_method.h>
|
||||||
|
#include <grpcpp/support/server_callback.h>
|
||||||
|
#include <grpcpp/impl/codegen/server_callback_handlers.h>
|
||||||
|
#include <grpcpp/server_context.h>
|
||||||
|
#include <grpcpp/impl/service_type.h>
|
||||||
|
#include <grpcpp/support/sync_stream.h>
|
||||||
|
namespace greptime {
|
||||||
|
namespace v1 {
|
||||||
|
namespace index {
|
||||||
|
|
||||||
|
} // namespace greptime
|
||||||
|
} // namespace v1
|
||||||
|
} // namespace index
|
||||||
|
|
||||||
@@ -0,0 +1,52 @@
|
|||||||
|
// Generated by the gRPC C++ plugin.
|
||||||
|
// If you make any local change, they will be lost.
|
||||||
|
// source: greptime/v1/index/inverted_index.proto
|
||||||
|
// Original file comments:
|
||||||
|
// Copyright 2023 Greptime Team
|
||||||
|
//
|
||||||
|
// Licensed 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.
|
||||||
|
//
|
||||||
|
#ifndef GRPC_greptime_2fv1_2findex_2finverted_5findex_2eproto__INCLUDED
|
||||||
|
#define GRPC_greptime_2fv1_2findex_2finverted_5findex_2eproto__INCLUDED
|
||||||
|
|
||||||
|
#include "greptime/v1/index/inverted_index.pb.h"
|
||||||
|
|
||||||
|
#include <functional>
|
||||||
|
#include <grpcpp/generic/async_generic_service.h>
|
||||||
|
#include <grpcpp/support/async_stream.h>
|
||||||
|
#include <grpcpp/support/async_unary_call.h>
|
||||||
|
#include <grpcpp/support/client_callback.h>
|
||||||
|
#include <grpcpp/client_context.h>
|
||||||
|
#include <grpcpp/completion_queue.h>
|
||||||
|
#include <grpcpp/support/message_allocator.h>
|
||||||
|
#include <grpcpp/support/method_handler.h>
|
||||||
|
#include <grpcpp/impl/codegen/proto_utils.h>
|
||||||
|
#include <grpcpp/impl/rpc_method.h>
|
||||||
|
#include <grpcpp/support/server_callback.h>
|
||||||
|
#include <grpcpp/impl/codegen/server_callback_handlers.h>
|
||||||
|
#include <grpcpp/server_context.h>
|
||||||
|
#include <grpcpp/impl/service_type.h>
|
||||||
|
#include <grpcpp/impl/codegen/status.h>
|
||||||
|
#include <grpcpp/support/stub_options.h>
|
||||||
|
#include <grpcpp/support/sync_stream.h>
|
||||||
|
|
||||||
|
namespace greptime {
|
||||||
|
namespace v1 {
|
||||||
|
namespace index {
|
||||||
|
|
||||||
|
} // namespace index
|
||||||
|
} // namespace v1
|
||||||
|
} // namespace greptime
|
||||||
|
|
||||||
|
|
||||||
|
#endif // GRPC_greptime_2fv1_2findex_2finverted_5findex_2eproto__INCLUDED
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,74 @@
|
|||||||
|
// Copyright 2023 Greptime Team
|
||||||
|
//
|
||||||
|
// Licensed 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.
|
||||||
|
|
||||||
|
syntax = "proto3";
|
||||||
|
|
||||||
|
package greptime.v1.index;
|
||||||
|
|
||||||
|
option java_package = "io.greptime.v1.index";
|
||||||
|
option java_outer_classname = "Index";
|
||||||
|
option go_package = "github.com/GreptimeTeam/greptime-proto/go/greptime/v1/index";
|
||||||
|
|
||||||
|
// InvertedIndexMetas defines the metadata for an inverted index
|
||||||
|
// within an SST file.
|
||||||
|
message InvertedIndexMetas {
|
||||||
|
// A map of tag names to their respective metadata corresponding to an individual
|
||||||
|
// inverted index within the SST file.
|
||||||
|
map<string, InvertedIndexMeta> metas = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// InvertedIndexMeta contains the metadata for a specific tag's inverted index.
|
||||||
|
message InvertedIndexMeta {
|
||||||
|
// Name of the tag associated with the inverted index.
|
||||||
|
string name = 1;
|
||||||
|
|
||||||
|
// Defines the number of rows per group for bitmap indexing. It determines how rows
|
||||||
|
// are batched for indexing, with each batch corresponding to a segment in the bitmap.
|
||||||
|
// The groups are usually of uniform size, with the exception of the final group which
|
||||||
|
// may contain fewer rows if the total row count is not a multiple of 'row_count_in_group'.
|
||||||
|
// Segmenting allows indexed values in the tag column to be quickly located within
|
||||||
|
// their respective groups during a query, reducing the search space and improving
|
||||||
|
// retrieval efficiency.
|
||||||
|
uint64 row_count_in_group = 2;
|
||||||
|
|
||||||
|
// The byte offset of the Finite State Transducer (FST) within the SST file.
|
||||||
|
uint64 fst_offset = 3;
|
||||||
|
|
||||||
|
// The size in bytes of the FST data.
|
||||||
|
uint64 fst_size = 4;
|
||||||
|
|
||||||
|
// The byte offset where the null bitmap for this tag starts.
|
||||||
|
uint64 null_bitmap_offset = 5;
|
||||||
|
|
||||||
|
// The size in bytes of the null bitmap.
|
||||||
|
uint64 null_bitmap_size = 6;
|
||||||
|
|
||||||
|
// Statistical information about the tag's inverted index.
|
||||||
|
InvertedIndexStats stats = 7;
|
||||||
|
}
|
||||||
|
|
||||||
|
// InvertedIndexStats provides statistical data on a tag's inverted index.
|
||||||
|
message InvertedIndexStats {
|
||||||
|
// The count of null entries within the tag's column.
|
||||||
|
uint64 null_count = 1;
|
||||||
|
|
||||||
|
// The number of distinct values within the tag's column.
|
||||||
|
uint64 distinct_count = 2;
|
||||||
|
|
||||||
|
// The minimum value found within the tag's column, encoded as bytes.
|
||||||
|
bytes min_value = 3;
|
||||||
|
|
||||||
|
// The maximum value found within the tag's column, encoded as bytes.
|
||||||
|
bytes max_value = 4;
|
||||||
|
}
|
||||||
@@ -18,6 +18,7 @@ use crate::v1::value::ValueData;
|
|||||||
|
|
||||||
pub const GREPTIME_GRPC_DESC: &[u8] = tonic::include_file_descriptor_set!("greptime_grpc_desc");
|
pub const GREPTIME_GRPC_DESC: &[u8] = tonic::include_file_descriptor_set!("greptime_grpc_desc");
|
||||||
|
|
||||||
|
pub mod index;
|
||||||
pub mod meta;
|
pub mod meta;
|
||||||
pub mod region;
|
pub mod region;
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,15 @@
|
|||||||
|
// Copyright 2023 Greptime Team
|
||||||
|
//
|
||||||
|
// Licensed 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.
|
||||||
|
|
||||||
|
tonic::include_proto!("greptime.v1.index");
|
||||||
Reference in New Issue
Block a user