csun5285 commented on code in PR #54068:
URL: https://github.com/apache/doris/pull/54068#discussion_r2335879571
##########
be/src/vec/functions/function_map.cpp:
##########
@@ -126,6 +126,8 @@ class FunctionMap : public IFunction {
offset += num_element / 2;
result_col_map_offsets[row] = offset;
}
+
+ RETURN_IF_ERROR(map_column->deduplicate_keys());
Review Comment:
map_column->deduplicate_keys(true)? 比如是:map(2, map(2, 3, 2, 3))
##########
be/src/vec/columns/column_map.cpp:
##########
@@ -505,6 +507,96 @@ MutableColumnPtr ColumnMap::permute(const Permutation&
perm, size_t limit) const
assert_cast<const
ColumnArray&>(*k_arr).get_offsets_ptr());
}
+Status ColumnMap::deduplicate_keys(bool recursive) {
+ const auto inner_rows = keys_column->size();
+ const auto rows = offsets_column->size();
+
+ if (recursive) {
Review Comment:
这里是不是总是检查嵌套的map ,如果是就去去重一遍,这样调用 deduplicate_keys 不用考虑是否嵌套了。
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]