You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#[derive(Debug,Clone,Default)]pubstructIndexBaseOutput{/// Size of the index.pubindex_size:ByteCount,/// Number of rows in the index.pubrow_count:RowCount,/// Available columns in the index.pubcolumns:Vec<ColumnId>,}pubtypeInvertedIndexOutput = IndexBaseOutput;pubtypeFulltextIndexOutput = IndexBaseOutput;
Define IndexBaseOutput struct.
type IndexBaseOutput to InvertedIndexOutput and FulltextIndexOutput.
In the future, if InvertedIndexOutput or FulltextIndexOutput has non-public fields, it can be modified like this:
I have no objection, you are free to change it this way. My original idea was that these two indexes have the opportunity to present different Output, and it would be more convenient to separate them in case fields are added later.
What type of enhancement is this?
Refactor
What does the enhancement do?
When I read the relevant code of the Mito engine, I found that two identical structures are defined:
greptimedb/src/mito2/src/sst/index.rs
Lines 68 to 75 in 975b8c6
greptimedb/src/mito2/src/sst/index.rs
Lines 57 to 64 in 975b8c6
Perhaps defining a base structure is sufficient.
Implementation challenges
IndexBaseOutput
struct.IndexBaseOutput
toInvertedIndexOutput
andFulltextIndexOutput
.In the future, if
InvertedIndexOutput
orFulltextIndexOutput
has non-public fields, it can be modified like this:The text was updated successfully, but these errors were encountered: