-
Notifications
You must be signed in to change notification settings - Fork 3.8k
[fix](iceberg) iceberg use custom method to encode special characters in column name #27108
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -467,7 +467,7 @@ Status VFileScanner::_cast_to_input_block(Block* block) { | |
|
|
||
| Status VFileScanner::_fill_columns_from_path(size_t rows) { | ||
| DataTypeSerDe::FormatOptions _text_formatOptions; | ||
| for (auto& kv : *_partition_columns) { | ||
| for (auto& kv : _partition_col_descs) { | ||
| auto doris_column = _src_block_ptr->get_by_name(kv.first).column; | ||
| IColumn* col_ptr = const_cast<IColumn*>(doris_column.get()); | ||
| auto& [value, slot_desc] = kv.second; | ||
|
|
@@ -500,7 +500,7 @@ Status VFileScanner::_fill_missing_columns(size_t rows) { | |
| } | ||
|
|
||
| SCOPED_TIMER(_fill_missing_columns_timer); | ||
| for (auto& kv : *_missing_columns) { | ||
| for (auto& kv : _missing_col_descs) { | ||
| if (kv.second == nullptr) { | ||
| // no default column, fill with null | ||
| auto nullable_column = reinterpret_cast<vectorized::ColumnNullable*>( | ||
|
|
@@ -930,9 +930,8 @@ Status VFileScanner::_get_next_reader() { | |
| } | ||
|
|
||
| Status VFileScanner::_generate_fill_columns() { | ||
| _partition_columns.reset( | ||
| new std::unordered_map<std::string, std::tuple<std::string, const SlotDescriptor*>>()); | ||
| _missing_columns.reset(new std::unordered_map<std::string, VExprContextSPtr>()); | ||
| _partition_col_descs.clear(); | ||
| _missing_col_descs.clear(); | ||
|
|
||
| const TFileRangeDesc& range = _ranges.at(_next_range - 1); | ||
| if (range.__isset.columns_from_path && !_partition_slot_descs.empty()) { | ||
|
|
@@ -949,8 +948,8 @@ Status VFileScanner::_generate_fill_columns() { | |
| if (size == 4 && memcmp(data, "null", 4) == 0) { | ||
| data = const_cast<char*>("\\N"); | ||
| } | ||
| _partition_columns->emplace(slot_desc->col_name(), | ||
| std::make_tuple(data, slot_desc)); | ||
| _partition_col_descs.emplace(slot_desc->col_name(), | ||
| std::make_tuple(data, slot_desc)); | ||
| } | ||
| } | ||
| } | ||
|
|
@@ -969,16 +968,11 @@ Status VFileScanner::_generate_fill_columns() { | |
| return Status::InternalError("failed to find default value expr for slot: {}", | ||
| slot_desc->col_name()); | ||
| } | ||
| _missing_columns->emplace(slot_desc->col_name(), it->second); | ||
| _missing_col_descs.emplace(slot_desc->col_name(), it->second); | ||
| } | ||
| } | ||
|
|
||
| RETURN_IF_ERROR(_cur_reader->set_fill_columns(*_partition_columns, *_missing_columns)); | ||
| if (_cur_reader->fill_all_columns()) { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why remove this?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Because adding this will make the logic even more confusing. There's no need for cleaning the |
||
| _partition_columns.reset(nullptr); | ||
| _missing_columns.reset(nullptr); | ||
| } | ||
| return Status::OK(); | ||
| return _cur_reader->set_fill_columns(_partition_col_descs, _missing_col_descs); | ||
| } | ||
|
|
||
| Status VFileScanner::_init_expr_ctxes() { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,11 @@ | ||
| -- This file is automatically generated. You should know what you did if you want to edit this | ||
| -- !q01 -- | ||
| 599715 | ||
| 599715 | ||
|
|
||
| -- !sanitize_mara -- | ||
| MATNR1 3.140 /DSD/SV_CNT_GRP1 | ||
| MATNR2 3.240 /DSD/SV_CNT_GRP2 | ||
| MATNR4 3.440 /DSD/SV_CNT_GRP4 | ||
| MATNR5 3.540 /DSD/SV_CNT_GRP5 | ||
| MATNR6 3.640 /DSD/SV_CNT_GRP6 | ||
|
|
Uh oh!
There was an error while loading. Please reload this page.