Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
4a70d3b
object_storage_cluster_join_mode global
ianton-ru Feb 6, 2026
972f1ee
Global gross join
ianton-ru Feb 26, 2026
b6bf151
Test for object_storage_cluster_join_mode='global'
ianton-ru Mar 2, 2026
06b4ede
Fix file identifier in rescheduleTasksFromReplica
ianton-ru Mar 9, 2026
38e89f4
Merge branch 'antalya-26.1' into feature/antalya-26.1/json_part2
ianton-ru Mar 13, 2026
e15af07
Check context existing before use
ianton-ru Mar 13, 2026
ca8fc80
Merge branch 'antalya-26.1' into bugfix/antalya-26.1/task_reschedule_fix
ianton-ru Mar 16, 2026
604c788
Fix unsynchronized access to replica_to_files_to_be_processed
ianton-ru Mar 16, 2026
7649388
Merge branch 'antalya-26.1' into feature/antalya-26.1/json_part2
ianton-ru Mar 17, 2026
cb5e474
Merge branch 'antalya-26.1' into feature/antalya-26.1/json_part2
ianton-ru Mar 18, 2026
b69eb19
Fix rescheduleTasksFromReplica
ianton-ru Mar 23, 2026
0cd90a8
Try to fix again
ianton-ru Mar 23, 2026
904d00e
Fix setting description
ianton-ru Mar 23, 2026
d0de2cf
Merge branch 'antalya-26.1' into feature/antalya-26.1/json_part2
ianton-ru Mar 23, 2026
000a737
User/password auth for object_storage_remote_initiator
ianton-ru Mar 24, 2026
d4b850d
Keep function settings in remote call
ianton-ru Mar 24, 2026
0c95253
object_storage_remote_initiator_cluster setting
ianton-ru Mar 25, 2026
8dab965
Fix remote query with clustre, unknown on initial node
ianton-ru Mar 25, 2026
a0d1972
Fix FunctionNode::toASTImpl
ianton-ru Mar 25, 2026
d7c4bee
Remove unused header
ianton-ru Mar 25, 2026
df2595a
Fix test
ianton-ru Mar 26, 2026
d8b6b82
Add comments
ianton-ru Mar 27, 2026
259fb32
Merge branch 'antalya-26.1' into feature/antalya-26.1/remote_initiato…
ianton-ru Mar 27, 2026
a5eee1d
Fix setting object_storage_remote_initiator_cluster cleanup
ianton-ru Mar 30, 2026
8bb25e0
Merge branch 'bugfix/antalya-26.1/task_reschedule_fix' into test/anta…
ianton-ru Mar 30, 2026
b4ff8c5
Merge branch 'feature/antalya-26.1/json_part2' into test/antalya_26.1…
ianton-ru Mar 30, 2026
033fab7
Merge branch 'bugfix/antalya-26.1/1554_fix_crash' into test/antalya_2…
ianton-ru Mar 30, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 29 additions & 1 deletion src/Analyzer/FunctionNode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include <DataTypes/DataTypeSet.h>

#include <Parsers/ASTFunction.h>
#include <Parsers/ASTSetQuery.h>

#include <Functions/IFunction.h>

Expand Down Expand Up @@ -164,14 +165,21 @@ void FunctionNode::dumpTreeImpl(WriteBuffer & buffer, FormatState & format_state
buffer << '\n' << std::string(indent + 2, ' ') << "WINDOW\n";
getWindowNode()->dumpTreeImpl(buffer, format_state, indent + 4);
}

if (!settings_changes.empty())
{
buffer << '\n' << std::string(indent + 2, ' ') << "SETTINGS";
for (const auto & change : settings_changes)
buffer << fmt::format(" {}={}", change.name, fieldToString(change.value));
}
}

bool FunctionNode::isEqualImpl(const IQueryTreeNode & rhs, CompareOptions compare_options) const
{
const auto & rhs_typed = assert_cast<const FunctionNode &>(rhs);
if (function_name != rhs_typed.function_name || isAggregateFunction() != rhs_typed.isAggregateFunction()
|| isOrdinaryFunction() != rhs_typed.isOrdinaryFunction() || isWindowFunction() != rhs_typed.isWindowFunction()
|| nulls_action != rhs_typed.nulls_action)
|| nulls_action != rhs_typed.nulls_action || settings_changes != rhs_typed.settings_changes)
return false;

/// is_operator is ignored here because it affects only AST formatting
Expand Down Expand Up @@ -206,6 +214,17 @@ void FunctionNode::updateTreeHashImpl(HashState & hash_state, CompareOptions com
hash_state.update(isWindowFunction());
hash_state.update(nulls_action);

hash_state.update(settings_changes.size());
for (const auto & change : settings_changes)
{
hash_state.update(change.name.size());
hash_state.update(change.name);

const auto & value_dump = change.value.dump();
hash_state.update(value_dump.size());
hash_state.update(value_dump);
}

/// is_operator is ignored here because it affects only AST formatting

if (!compare_options.compare_types)
Expand All @@ -230,6 +249,7 @@ QueryTreeNodePtr FunctionNode::cloneImpl() const
result_function->nulls_action = nulls_action;
result_function->wrap_with_nullable = wrap_with_nullable;
result_function->is_operator = is_operator;
result_function->settings_changes = settings_changes;

return result_function;
}
Expand Down Expand Up @@ -292,6 +312,14 @@ ASTPtr FunctionNode::toASTImpl(const ConvertToASTOptions & options) const
function_ast->window_definition = window_node->toAST(new_options);
}

if (!settings_changes.empty())
{
auto settings_ast = make_intrusive<ASTSetQuery>();
settings_ast->changes = settings_changes;
settings_ast->is_standalone = false;
function_ast->arguments->children.push_back(settings_ast);
}

return function_ast;
}

Expand Down
15 changes: 15 additions & 0 deletions src/Analyzer/FunctionNode.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include <Functions/IFunction.h>
#include <Parsers/NullsAction.h>
#include <Common/typeid_cast.h>
#include <Common/SettingsChanges.h>

namespace DB
{
Expand Down Expand Up @@ -204,6 +205,18 @@ class FunctionNode final : public IQueryTreeNode
wrap_with_nullable = true;
}

/// Get settings changes passed to table function
const SettingsChanges & getSettingsChanges() const
{
return settings_changes;
}

/// Set settings changes passed as last argument to table function
void setSettingsChanges(SettingsChanges settings_changes_)
{
settings_changes = std::move(settings_changes_);
}

void dumpTreeImpl(WriteBuffer & buffer, FormatState & format_state, size_t indent) const override;

protected:
Expand All @@ -228,6 +241,8 @@ class FunctionNode final : public IQueryTreeNode
static constexpr size_t arguments_child_index = 1;
static constexpr size_t window_child_index = 2;
static constexpr size_t children_size = window_child_index + 1;

SettingsChanges settings_changes;
};

}
7 changes: 6 additions & 1 deletion src/Analyzer/QueryTreeBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -699,7 +699,12 @@ QueryTreeNodePtr QueryTreeBuilder::buildExpression(const ASTPtr & expression, co
{
const auto & function_arguments_list = function->arguments->as<ASTExpressionList>()->children;
for (const auto & argument : function_arguments_list)
function_node->getArguments().getNodes().push_back(buildExpression(argument, context));
{
if (const auto * ast_set = argument->as<ASTSetQuery>())
function_node->setSettingsChanges(ast_set->changes);
else
function_node->getArguments().getNodes().push_back(buildExpression(argument, context));
}
}

if (function->is_window_function)
Expand Down
1 change: 1 addition & 0 deletions src/Analyzer/Resolve/QueryAnalyzer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3861,6 +3861,7 @@ void QueryAnalyzer::resolveTableFunction(QueryTreeNodePtr & table_function_node,
{
auto table_function_node_to_resolve_typed = std::make_shared<TableFunctionNode>(table_function_argument_function_name);
table_function_node_to_resolve_typed->getArgumentsNode() = table_function_argument_function->getArgumentsNode();
table_function_node_to_resolve_typed->setSettingsChanges(table_function_argument_function->getSettingsChanges());

QueryTreeNodePtr table_function_node_to_resolve = std::move(table_function_node_to_resolve_typed);
if (table_function_argument_function_name == "view")
Expand Down
5 changes: 4 additions & 1 deletion src/Core/Settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1930,7 +1930,7 @@ ClickHouse applies this setting when the query contains the product of object st
Possible values:

- `local` — Replaces the database and table in the subquery with local ones for the destination server (shard), leaving the normal `IN`/`JOIN.`
- `global` — Unsupported for now. Replaces the `IN`/`JOIN` query with `GLOBAL IN`/`GLOBAL JOIN.`
- `global` — Replaces the `IN`/`JOIN` query with `GLOBAL IN`/`GLOBAL JOIN.` Right table executes first and is added to the secondary query as temporay table.
- `allow` — Default value. Allows the use of these types of subqueries.
)", 0) \
\
Expand Down Expand Up @@ -7658,6 +7658,9 @@ Rewrite expressions like 'x IN subquery' to JOIN. This might be useful for optim
)", EXPERIMENTAL) \
DECLARE(Bool, object_storage_remote_initiator, false, R"(
Execute request to object storage as remote on one of object_storage_cluster nodes.
)", EXPERIMENTAL) \
DECLARE(String, object_storage_remote_initiator_cluster, "", R"(
Cluster to choose remote initiator, when `object_storage_remote_initiator` is true. When empty, `object_storage_cluster` is used.
)", EXPERIMENTAL) \
DECLARE(Bool, allow_experimental_iceberg_read_optimization, true, R"(
Allow Iceberg read optimization based on Iceberg metadata.
Expand Down
9 changes: 1 addition & 8 deletions src/Core/SettingsChangesHistory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ const VersionToSettingsChangesMap & getSettingsChangesHistory()
addSettingsChanges(settings_changes_history, "26.1.3.20001.altinityantalya",
{
{"iceberg_partition_timezone", "", "", "New setting."},
// {"object_storage_max_nodes", 0, 0, "Antalya: New setting"},
{"s3_propagate_credentials_to_other_storages", false, false, "New setting"},
{"export_merge_tree_part_filename_pattern", "", "{part_name}_{checksum}", "New setting"},
{"object_storage_remote_initiator_cluster", "", "", "New setting."},
{"iceberg_metadata_staleness_ms", 0, 0, "New setting allowing using cached metadata version at READ operations to prevent fetching from remote catalog"},
});
addSettingsChanges(settings_changes_history, "26.1",
Expand Down Expand Up @@ -247,26 +247,19 @@ const VersionToSettingsChangesMap & getSettingsChangesHistory()
{"object_storage_cluster_join_mode", "allow", "allow", "New setting"},
{"lock_object_storage_task_distribution_ms", 500, 500, "New setting."},
{"allow_retries_in_cluster_requests", false, false, "New setting"},
// {"object_storage_remote_initiator", false, false, "New setting."},
{"allow_experimental_export_merge_tree_part", false, true, "Turned ON by default for Antalya."},
{"export_merge_tree_part_overwrite_file_if_exists", false, false, "New setting."},
{"export_merge_tree_partition_force_export", false, false, "New setting."},
{"export_merge_tree_partition_max_retries", 3, 3, "New setting."},
{"export_merge_tree_partition_manifest_ttl", 180, 180, "New setting."},
{"export_merge_tree_part_file_already_exists_policy", "skip", "skip", "New setting."},
// {"iceberg_timezone_for_timestamptz", "UTC", "UTC", "New setting."},
{"hybrid_table_auto_cast_columns", true, true, "New setting to automatically cast Hybrid table columns when segments disagree on types. Default enabled."},
{"allow_experimental_hybrid_table", false, false, "Added new setting to allow the Hybrid table engine."},
{"enable_alias_marker", true, true, "New setting."},
// {"input_format_parquet_use_native_reader_v3", false, true, "Seems stable"},
// {"input_format_parquet_verify_checksums", true, true, "New setting."},
// {"output_format_parquet_write_checksums", false, true, "New setting."},
{"export_merge_tree_part_max_bytes_per_file", 0, 0, "New setting."},
{"export_merge_tree_part_max_rows_per_file", 0, 0, "New setting."},
{"export_merge_tree_partition_lock_inside_the_task", false, false, "New setting."},
{"export_merge_tree_partition_system_table_prefer_remote_information", true, true, "New setting."},
// {"cluster_table_function_split_granularity", "file", "file", "New setting."},
// {"cluster_table_function_buckets_batch_size", 0, 0, "New setting."},
{"export_merge_tree_part_throw_on_pending_mutations", true, true, "New setting."},
{"export_merge_tree_part_throw_on_pending_patch_parts", true, true, "New setting."},
{"object_storage_cluster", "", "", "Antalya: New setting"},
Expand Down
Loading
Loading