mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-23 16:12:01 +00:00
fix crash
This commit is contained in:
parent
58b7ac2264
commit
8426e0d5e5
@ -361,7 +361,6 @@ size_t HashJoinMethods<KIND, STRICTNESS, MapsTemplate>::joinRightColumns(
|
||||
}
|
||||
|
||||
bool right_row_found = false;
|
||||
|
||||
KnownRowsHolder<flag_per_row> known_rows;
|
||||
for (size_t onexpr_idx = 0; onexpr_idx < added_columns.join_on_keys.size(); ++onexpr_idx)
|
||||
{
|
||||
@ -693,7 +692,7 @@ size_t HashJoinMethods<KIND,STRICTNESS, MapsTemplate>::joinRightColumnsWithAddti
|
||||
any_matched = true;
|
||||
if constexpr (join_features.is_semi_join || join_features.is_any_join)
|
||||
{
|
||||
auto used_once = used_flags.template setUsedOnce<true, true>(
|
||||
auto used_once = used_flags.template setUsedOnce<join_features.need_flags, true>(
|
||||
selected_right_row_it->block, selected_right_row_it->row_num, 0);
|
||||
if (used_once)
|
||||
{
|
||||
|
@ -22,7 +22,7 @@ struct JoinFeatures
|
||||
static constexpr bool need_filter = !need_replication && (inner || right || (is_semi_join && left) || (is_anti_join && left));
|
||||
static constexpr bool add_missing = (left || full) && !is_semi_join;
|
||||
|
||||
static constexpr bool need_flags = MapGetter<KIND, STRICTNESS, std::is_same_v<std::decay_t<Map>, HashJoin::MapsOne>>::flagged;
|
||||
static constexpr bool need_flags = MapGetter<KIND, STRICTNESS, std::is_same_v<std::decay_t<Map>, HashJoin::MapsAll>>::flagged;
|
||||
static constexpr bool is_maps_all = std::is_same_v<std::decay_t<Map>, HashJoin::MapsAll>;
|
||||
};
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
03006_join_on_inequal_expression_fast.sql
|
||||
-- { echoOn }
|
||||
SET join_algorithm='hash';
|
||||
SELECT t1.*, t2.* FROM t1 LEFT JOIN t2 ON (t1.a < t2.a OR lower(t1.attr) == lower(t2.attr)) AND t1.key = t2.key ORDER BY (t1.key, t1.attr, t2.key, t2.attr);
|
||||
|
Loading…
Reference in New Issue
Block a user