Repository navigation
Refactor query engine settings - #73693
Conversation
|
This is an automated comment for commit af56c74 with description of existing statuses. It's updated for the latest CI running ✅ Click here to open a full report in a separate page Successful checks
|
573b3b4 to
ad948b7
Compare
ad948b7 to
3acb696
Compare
(ignore: - max_optimizations_to_apply: 0 vs. 10k - optimize_use_implicit_projections: false vs. true - distinct_in_order: false vs. true - Usages potentially impacted by refactoring: Interpreters/MutationsInterpreter.cpp )
(ignore: - min_count_to_compile_expressions: 0 vs. 3 - short_circuit_function_evaluation: disable vs enable )
c862b15 to
af56c74
Compare
|
I have quesiton, IIUC, void optimizeTreeFirstPass(const QueryPlanOptimizationSettings & optimization_settings, QueryPlan::Node & root, QueryPlan::Nodes & nodes)
{
if (!optimization_settings.optimize_plan)
return;
// ......
}I am not clear the comment of the following codes, does it mean only first pass optimization change the transformers? QueryPlanOptimizationSettings optimization_settings(context);
/// All optimisations will be done at plans creation
optimization_settings.optimize_plan = false; |
That was probably an oversight, I'll push a separate PR to address that (i.e. enable/disable also the 2nd pass). EDIT: Disabling the 2nd / 3rd passes doesn't look safe. We better keep it as is.
QueryPlanOptimizationSettings optimization_settings(context);
/// All optimisations will be done at plans creation
optimization_settings.optimize_plan = false;I don't understand what "only first pass optimization change the transformers" means. |
* [GLUTEN-1632][CH]Daily Update Clickhouse Version (20250103) * Fix gtest due to ClickHouse/ClickHouse#73811 * Another way to set query_plan_enable_optimizations to false * Try to set max_threads to 1, but GlutenClickHouseTPCHColumnarShuffleParquetAQESuite::q1 and q2 will fail * Fix Build Due to ClickHouse/ClickHouse#73693 * Restore QueryPlanOptimizationSettings * COLLECT_METRICS * Fix build due to ClickHouse/ClickHouse#73994 --------- Co-authored-by: kyligence-git <[email protected]> Co-authored-by: Chang Chen <[email protected]>
Various settings classes in the query engine code look like this:
The member variables ^^ are default-initialized. This is a problem: First, it repeats the default setting values in
src/Core/Settings.cpp(redundancy). Second, is dangerous as there are already subtle differences between default-initialized values and settings.This PR gets rid of the default initialization by replacing the static factory methods with normal constructors:
Motivated by #73393 (comment)
Review note: this PR is best reviewed commit by commit.
Changelog category (leave one):