Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 3.9k
[refactor](storage) replace TypeInfo polymorphic hierarchy with FieldType#63153
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -48,8 +48,7 @@ bool IndexColumnWriter::check_support_ann_index(const TabletColumn& column) { | ||
| Status IndexColumnWriter::create(const StorageField* field, std::unique_ptr<IndexColumnWriter>* res, | ||
| IndexFileWriter* index_file_writer, | ||
| const TabletIndex* index_meta) { | ||
| const auto* typeinfo = field->type_info(); | ||
| FieldType type = typeinfo->type(); | ||
| FieldType type = field->type(); | ||
| std::string field_name; | ||
| auto storage_format = index_file_writer->get_storage_format(); | ||
| if (storage_format == InvertedIndexStorageFormatPB::V1) { | ||
| @@ -67,12 +66,12 @@ Status IndexColumnWriter::create(const StorageField* field, std::unique_ptr<Inde | ||
| if (index_meta->is_inverted_index()) { | ||
| bool single_field = true; | ||
| if (type == FieldType::OLAP_FIELD_TYPE_ARRAY) { | ||
| const auto* array_typeinfo = dynamic_cast<const ArrayTypeInfo*>(typeinfo); | ||
| const auto& column = field->get_desc(); | ||
csun5285 marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| bool has_item_subcolumn = column.get_subtype_count() > 0; | ||
| DBUG_EXECUTE_IF("InvertedIndexColumnWriter::create_array_typeinfo_is_nullptr", | ||
| { array_typeinfo = nullptr; }) | ||
| if (array_typeinfo != nullptr) { | ||
| typeinfo = array_typeinfo->item_type_info(); | ||
| type = typeinfo->type(); | ||
| { has_item_subcolumn = false; }) | ||
| if (has_item_subcolumn) { | ||
| type = column.get_sub_column(0).type(); | ||
| single_field = false; | ||
| } else { | ||
| return Status::NotSupported("unsupported array type for inverted index: " + | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -64,12 +64,12 @@ Status IndexedColumnReader::load(bool use_page_cache, bool kept_in_memory, | ||
| _use_page_cache = use_page_cache; | ||
| _kept_in_memory = kept_in_memory; | ||
| _type_info = get_scalar_type_info((FieldType)_meta.data_type()); | ||
| if (_type_info == nullptr) { | ||
| _type = (FieldType)_meta.data_type(); | ||
| if (!is_scalar_type(_type)) { | ||
csun5285 marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| return Status::NotSupported("unsupported typeinfo, type={}", _meta.data_type()); | ||
| } | ||
| RETURN_IF_ERROR(EncodingInfo::get(_type_info->type(), _meta.encoding(), {}, &_encoding_info)); | ||
| _value_key_coder = get_key_coder(_type_info->type()); | ||
| RETURN_IF_ERROR(EncodingInfo::get(_type, _meta.encoding(), {}, &_encoding_info)); | ||
| _value_key_coder = get_key_coder(_type); | ||
| // read and parse ordinal index page when exists | ||
| if (_meta.has_ordinal_index_meta()) { | ||
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.