Skip to content

Commit 430850a

Browse files
Backport #69886 to 24.9: Change the join_to_sort settings type to unsigned int
1 parent 4f5f310 commit 430850a

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/Core/Settings.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -342,8 +342,8 @@ namespace ErrorCodes
342342
\
343343
M(Bool, join_use_nulls, false, "Use NULLs for non-joined rows of outer JOINs for types that can be inside Nullable. If false, use default value of corresponding columns data type.", IMPORTANT) \
344344
\
345-
M(Int32, join_output_by_rowlist_perkey_rows_threshold, 5, "The lower limit of per-key average rows in the right table to determine whether to output by row list in hash join.", 0) \
346-
M(JoinStrictness, join_default_strictness, JoinStrictness::All, "Set default strictness in JOIN query. Possible values: empty string, 'ANY', 'ALL'. If empty, query without strictness will throw exception.", 0) \
345+
M(UInt64, join_output_by_rowlist_perkey_rows_threshold, 5, "The lower limit of per-key average rows in the right table to determine whether to output by row list in hash join.", 0) \
346+
M(JoinStrictness, join_default_strictness, JoinStrictness::All, "Set default strictness in JOIN query. Possible values: empty string, 'ANY', 'ALL'. If empty, query without strictness will throw an exception.", 0) \
347347
M(Bool, any_join_distinct_right_table_keys, false, "Enable old ANY JOIN logic with many-to-one left-to-right table keys mapping for all ANY JOINs. It leads to confusing not equal results for 't1 ANY LEFT JOIN t2' and 't2 ANY RIGHT JOIN t1'. ANY RIGHT JOIN needs one-to-many keys mapping to be consistent with LEFT one.", IMPORTANT) \
348348
M(Bool, single_join_prefer_left_table, true, "For single JOIN in case of identifier ambiguity prefer left table", IMPORTANT) \
349349
\
@@ -940,8 +940,8 @@ namespace ErrorCodes
940940
M(Bool, implicit_transaction, false, "If enabled and not already inside a transaction, wraps the query inside a full transaction (begin + commit or rollback)", 0) \
941941
M(UInt64, grace_hash_join_initial_buckets, 1, "Initial number of grace hash join buckets", 0) \
942942
M(UInt64, grace_hash_join_max_buckets, 1024, "Limit on the number of grace hash join buckets", 0) \
943-
M(Int32, join_to_sort_minimum_perkey_rows, 40, "The lower limit of per-key average rows in the right table to determine whether to rerange the right table by key in left or inner join. This setting ensures that the optimization is not applied for sparse table keys", 0) \
944-
M(Int32, join_to_sort_maximum_table_rows, 10000, "The maximum number of rows in the right table to determine whether to rerange the right table by key in left or inner join.", 0) \
943+
M(UInt64, join_to_sort_minimum_perkey_rows, 40, "The lower limit of per-key average rows in the right table to determine whether to rerange the right table by key in left or inner join. This setting ensures that the optimization is not applied for sparse table keys", 0) \
944+
M(UInt64, join_to_sort_maximum_table_rows, 10000, "The maximum number of rows in the right table to determine whether to rerange the right table by key in left or inner join.", 0) \
945945
M(Bool, allow_experimental_join_right_table_sorting, false, "If it is set to true, and the conditions of `join_to_sort_minimum_perkey_rows` and `join_to_sort_maximum_table_rows` are met, rerange the right table by key to improve the performance in left or inner hash join.", 0) \
946946
M(Timezone, session_timezone, "", "This setting can be removed in the future due to potential caveats. It is experimental and is not suitable for production usage. The default timezone for current session or query. The server default timezone if empty.", 0) \
947947
M(Bool, use_hive_partitioning, false, "Allows to use hive partitioning for File, URL, S3, AzureBlobStorage and HDFS engines.", 0)\

src/Interpreters/TableJoin.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,10 @@ namespace Setting
4646
extern const SettingsUInt64 default_max_bytes_in_join;
4747
extern const SettingsJoinAlgorithm join_algorithm;
4848
extern const SettingsUInt64 join_on_disk_max_files_to_merge;
49-
extern const SettingsInt32 join_output_by_rowlist_perkey_rows_threshold;
49+
extern const SettingsUInt64 join_output_by_rowlist_perkey_rows_threshold;
5050
extern const SettingsOverflowMode join_overflow_mode;
51-
extern const SettingsInt32 join_to_sort_maximum_table_rows;
52-
extern const SettingsInt32 join_to_sort_minimum_perkey_rows;
51+
extern const SettingsUInt64 join_to_sort_maximum_table_rows;
52+
extern const SettingsUInt64 join_to_sort_minimum_perkey_rows;
5353
extern const SettingsBool join_use_nulls;
5454
extern const SettingsUInt64 max_bytes_in_join;
5555
extern const SettingsUInt64 max_joined_block_size_rows;

0 commit comments

Comments
 (0)