Skip to content

Commit

Permalink
fix bug that collation does not work for nullable type (#3392) (#3395)
Browse files Browse the repository at this point in the history
close #3391
  • Loading branch information
ti-chi-bot authored Apr 12, 2022
1 parent 0f33c53 commit fab9b5b
Show file tree
Hide file tree
Showing 2 changed files with 111 additions and 54 deletions.
3 changes: 2 additions & 1 deletion dbms/src/Flash/Mpp/MPPHandler.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include <Common/FailPoint.h>
#include <Common/TiFlashMetrics.h>
#include <DataStreams/SquashingBlockOutputStream.h>
#include <DataTypes/DataTypeNullable.h>
#include <Flash/Coprocessor/DAGBlockOutputStream.h>
#include <Flash/Coprocessor/DAGCodec.h>
#include <Flash/Coprocessor/DAGUtils.h>
Expand Down Expand Up @@ -207,7 +208,7 @@ std::vector<RegionInfo> MPPTask::prepare(const mpp::DispatchTaskRequest & task_r
assert(isColumnExpr(expr));
auto column_index = decodeDAGInt64(expr.val());
partition_col_id.emplace_back(column_index);
if (has_collator_info && getDataTypeByFieldType(expr.field_type())->isString())
if (has_collator_info && removeNullable(getDataTypeByFieldType(expr.field_type()))->isString())
{
collators.emplace_back(getCollatorFromFieldType(exchangeSender.types(i)));
}
Expand Down
Loading

0 comments on commit fab9b5b

Please sign in to comment.