Commit Graph

1352 Commits

Author SHA1 Message Date
Anton Popov
12ea2fc4bf Merge remote-tracking branch 'upstream/master' into HEAD 2024-05-13 16:24:34 +00:00
Dmitry Novik
2458defd01 Analyzer: Forbid WINDOW redefinition 2024-05-13 15:16:35 +02:00
Nikolai Kochetov
bb9652998b Another attemtp. 2024-05-13 12:26:10 +00:00
Alexey Milovidov
23cf6d0d8b Useless changes 2024-05-11 22:51:57 +02:00
Alexey Milovidov
eff0d7cb8b Merge branch 'master' of github.com:ClickHouse/ClickHouse into clang-18-ci 2024-05-11 14:15:38 +02:00
Michael Kolupaev
c1ea1726b4 Remove weird special case in if() return type inference, to match multiIf() 2024-05-10 22:37:35 +00:00
Alexey Milovidov
426a51b624 Useless changes 2024-05-10 04:53:29 +02:00
Alexey Milovidov
1d69518c4d Useless changes 2024-05-09 02:07:04 +02:00
Alexey Milovidov
95f12ef274 Useless changes 2024-05-09 01:08:33 +02:00
Nikolai Kochetov
b2828fc852 Search nullable GB keys from all the parent scopes. 2024-05-08 16:06:38 +00:00
Nikolai Kochetov
880314fa08 Another case. 2024-05-08 11:49:15 +00:00
Nikolai Kochetov
134b468d91 Another case. 2024-05-07 18:14:32 +00:00
vdimir
c67a43e3a7
better 2024-05-07 14:37:39 +00:00
vdimir
fd75522ea8
analyzer: fix select * with grouping sets 2024-05-07 14:20:49 +00:00
Raúl Marín
d5b8d9b7b2
Merge pull request #63162 from kitaisreal/query-analysis-pass-improve-qualify-validation
QueryAnalysisPass improve QUALIFY validation
2024-05-07 12:18:36 +00:00
Nikolai Kochetov
b821f17f69 Merge branch 'master' into more-cases-for-group-by-use-nulls 2024-05-06 17:03:13 +00:00
vdimir
1016d2e0d3
Merge pull request #62995 from ClickHouse/vdimir/array_join_alias_resolve_fix
Analyzer: prefer column name to alias from array join
2024-05-06 10:33:10 +00:00
vdimir
2c22593205
fix style 2024-05-03 18:34:14 +02:00
vdimir
a8c931ac98
fix typo 2024-05-03 15:16:40 +02:00
Raúl Marín
e4c99ed1d5 Merge remote-tracking branch 'blessed/master' into untuple_crash 2024-05-02 15:24:57 +02:00
vdimir
b057b54d24
ValidateGroupByColumnsVisitor::areColumnSourcesEqual 2024-05-02 11:24:33 +00:00
Maksim Kita
a50c41c617 QueryAnalysisPass improve QUALIFY validation 2024-05-02 13:36:23 +03:00
Raúl Marín
89fe970cd2
Merge pull request #62929 from Algunenano/optimize_rewrite_sum_if_to_count_if
Enable optimize_rewrite_sum_if_to_count_if by default
2024-04-30 12:07:24 +00:00
Raúl Marín
10fb28c6ea Fix crash with untuple and unresolved lambda 2024-04-30 13:36:20 +02:00
vdimir
5f75e9847a
revert 2024-04-30 10:52:59 +00:00
Raúl Marín
97774571f1 Merge remote-tracking branch 'blessed/master' into 03132_rewrite_aggregate_function_with_if_implicit_cast 2024-04-29 14:54:23 +02:00
vdimir
d076479097
t 2024-04-29 10:14:41 +00:00
vdimir
3a8ca9a68b
bind only full identifier 2024-04-29 10:01:08 +00:00
Raúl Marín
8df67eb7ed
Merge branch 'master' into optimize_rewrite_sum_if_to_count_if 2024-04-29 11:51:09 +02:00
Maksim Kita
f5cfe597f2 Fixed tests 2024-04-28 12:52:17 +03:00
Maksim Kita
bd1189de70 Fixed tests 2024-04-28 12:52:17 +03:00
Maksim Kita
85dc0cf20a Fixed tests 2024-04-28 12:52:17 +03:00
Maksim Kita
06d2c18f26 Analyzer support recursive CTEs 2024-04-28 12:52:17 +03:00
Raúl Marín
09ff42de0f Remove optimize_monotonous_functions_in_order_by 2024-04-25 21:46:15 +02:00
Raúl Marín
052713db3b Fix order and reference files 2024-04-25 21:14:40 +02:00
Raúl Marín
3941d69c6b Fix optimize_rewrite_aggregate_function_with_if implicit cast 2024-04-25 20:25:40 +02:00
vdimir
64dba76afe
Analyzer: prefer column name to alias from array join 2024-04-25 16:54:49 +00:00
Nikolai Kochetov
34dd0a229f Another one case of aliases with group_by_use_null 2024-04-25 15:46:29 +00:00
Nikolai Kochetov
e1da9114fb
Merge pull request #62811 from canhld94/fix_cte_final
Fix FINAL modifier is not respected in CTE with analyzer
2024-04-25 14:37:50 +00:00
vdimir
02239dd9f9
Compare aliases for TableNode 2024-04-25 11:21:22 +00:00
Raúl Marín
70135abe70 Disable optimize_rewrite_aggregate_function_with_if for sum(nullable) 2024-04-24 15:51:11 +02:00
Maksim Kita
0e28d20791 Fixed code review issues 2024-04-22 14:37:04 +03:00
Maksim Kita
f1660fa8bb Analyzer support QUALIFY clause 2024-04-22 12:12:02 +03:00
Duc Canh Le
de5b0dab32 Fix FINAL modifier is not respected in CTE with analyzer
Signed-off-by: Duc Canh Le <duccanh.le@ahrefs.com>
2024-04-20 02:18:19 +00:00
Dmitry Novik
69cc3c9e8e
Analyzer: Fix exception message 2024-04-18 13:02:55 +02:00
Dmitry Novik
951fa6720f Merge remote-tracking branch 'origin/master' into analyzer-fix-param-view-alias 2024-04-17 12:41:06 +02:00
Dmitry Novik
14a49f804b
Merge pull request #62558 from ClickHouse/analyzer-fix-string-enum-optimization
Try to fix if_transform_strings_to_enum performance test
2024-04-16 10:57:27 +00:00
Nikolai Kochetov
6fa57b9d7d
Merge pull request #62567 from ClickHouse/fix-scalars-in-limit-offset
Fix scalar subquery in LIMIT
2024-04-12 15:03:45 +00:00
vdimir
602e17f3e6
Merge pull request #62142 from ClibMouse/fixes_in_with_pk_ft_scan
Fix primary index not being used when a redundant equals exists
2024-04-12 09:27:19 +00:00
Joshua Hildred
8f4f3aaf14 Small code cleanup 2024-04-11 12:56:50 -07:00
Nikolai Kochetov
61d4d9a46e
Update QueryAnalysisPass.cpp 2024-04-11 19:39:44 +02:00
Nikolai Kochetov
3e16309e99 Allow constant folding throught __getScalar 2024-04-11 15:25:52 +00:00
Joshua Hildred
dd49b09902 Address review comments 2024-04-11 06:58:35 -07:00
Dmitry Novik
5985a0d10b
Try to fix if_transform_strings_to_enum perf test 2024-04-11 15:40:53 +02:00
vdimir
fe4373fa53
Merge pull request #62387 from ClickHouse/vdimir/join_on_expression_optimizer_fix
Use function isNotDistinctFrom only in join key
2024-04-11 10:34:28 +00:00
Joshua Hildred
13774d897b Add additional tests for queries with toLowCardinality and toNullable 2024-04-10 19:09:03 -07:00
Joshua Hildred
dfa7a9704a Fix an isssue with constants being wrapped in nullables 2024-04-10 12:16:06 -07:00
Nikolai Kochetov
e87b5daa2d
Merge pull request #62236 from ClickHouse/group-by-use-nulls-another-fix
Fix another logical error in group_by_use_nulls.
2024-04-10 14:37:15 +00:00
flynn
eeeb8f3473 Merge branch 'master' of github.com:ClickHouse/ClickHouse into analyzer-position-arguments 2024-04-10 11:12:34 +00:00
vdimir
ecebeefabe
Merge branch 'master' into vdimir/join_on_expression_optimizer_fix 2024-04-10 12:18:21 +02:00
Dmitry Novik
443d3175af
Merge pull request #62433 from kitaisreal/optimize-group-by-injective-functions-pass-remove-unused-constant
OptimizeGroupByInjectiveFunctionsPass remove unused constant
2024-04-10 10:10:37 +00:00
Nikolai Kochetov
25d64d490a
Merge pull request #62409 from ClickHouse/fix-global-in-table-with-analyzer
Fix GLOBAL IN table queries with analyzer.
2024-04-10 07:04:21 +00:00
Joshua Hildred
626b7b1253 Fix style 2024-04-09 14:12:13 -07:00
Joshua Hildred
9d4f1d890e Add an optimization that removes redundant equality
checks on boolean functions. This fixes a bug in
which the primary index is not used for queries like
SELECT * FROM <table> WHERE <pk> in (<n>) = 1
2024-04-09 12:08:31 -07:00
flynn
6feb274467 Fix 2024-04-09 15:18:57 +00:00
Nikolai Kochetov
814de46e13 Another one case. 2024-04-09 15:08:03 +00:00
Dmitry Novik
728ed2eee3
Simplify the change 2024-04-09 16:44:38 +02:00
Nikolai Kochetov
3900b95faf Another one case with aliases. 2024-04-09 13:01:38 +00:00
Nikolai Kochetov
bba66eb05a Review fixes. 2024-04-09 12:30:07 +00:00
Robert Schulze
4035334634
Merge remote-tracking branch 'rschu1ze/master' into static-instance2 2024-04-09 11:45:27 +00:00
Maksim Kita
0543fc3263 OptimizeGroupByInjectiveFunctionsPass remove unused constant 2024-04-09 13:17:42 +03:00
Nikolai Kochetov
e5282bf39f I ♥ group_by_use_nulls. 2024-04-08 16:39:55 +00:00
flynn
f9402f3584 Fix 2024-04-08 15:15:45 +00:00
Nikolai Kochetov
3421135ff1
Merge pull request #62281 from ClickHouse/analyzer-fix-resolve-from-parent-scopes
Analyzer: Fix name resolution from parent scopes
2024-04-08 15:06:57 +02:00
vdimir
35be12c184
Merge pull request #62325 from ClickHouse/vdimir/fix_optimize_uniq_to_count
Fix optimize_uniq_to_count when only prefix of key is matched
2024-04-08 14:11:39 +02:00
vdimir
f3e1132136
Merge pull request #62273 from ClickHouse/vdimir/analyzer_limit_constant_folding
Analyzer: limit maximal size of column in constant folding
2024-04-08 12:49:48 +02:00
vdimir
b8f6217168
Use function isNotDistinctFrom only in join key 2024-04-08 09:57:33 +00:00
Robert Schulze
97281203b8
Don't access static members through instance, pt. II
clang-tidy rightfully complains
(-readability-static-accessed-through-instance) that static member
functions are accessed through non-static members
2024-04-07 11:09:35 +00:00
flynn
39df144107 Merge branch 'master' of github.com:ClickHouse/ClickHouse into analyzer-position-arguments 2024-04-07 04:22:52 +00:00
flynn
b6dd55827f Fix analyzer with positional arguments in distributed query 2024-04-06 14:23:45 +00:00
Nikolai Kochetov
d1c42668bd Another attempt. 2024-04-05 16:22:57 +00:00
Raúl Marín
7df11b1852
Merge pull request #62264 from Algunenano/nested_includes_Ñ
Remove more nested includes
2024-04-05 17:00:28 +02:00
Nikolai Kochetov
07893fab63 Revert "Fixing 02535_analyzer_group_by_use_nulls"
This reverts commit 3b6ea659df.
2024-04-05 12:01:39 +00:00
vdimir
ce1f514417
Fix optimize_uniq_to_count when only prefix of key is matched 2024-04-05 10:39:05 +00:00
Robert Schulze
7ce2a47ba5
Merge pull request #62265 from rschu1ze/static-instance
Don't access static members through instance
2024-04-04 14:36:03 +02:00
Dmitry Novik
33aee0f599 Analyzer: Fix name resolution from parent scopes 2024-04-04 13:00:51 +02:00
Raúl Marín
276246ee97 Introduce IAggregateFunction_fwd to reduce header dependencies 2024-04-04 12:29:54 +02:00
Dmitry Novik
7aab28bcc8 Analyzer: Fix alias to parametrized view resolution 2024-04-04 11:53:41 +02:00
vdimir
e516bef844
Annalyzer: limit maximal size of column in constant folding 2024-04-04 09:52:58 +00:00
Dmitry Novik
d86eae3dd9
Merge pull request #62186 from ClickHouse/analyzer-query-param
Analyzer: Fix query parameter resolution
2024-04-04 11:26:12 +02:00
vdimir
b4ae81ee00
Merge pull request #62253 from ClickHouse/vdimir/analyzer_legacy_lambda_syntax
Fix lambda(tuple(x), x + 1) syntax in analyzer
2024-04-04 11:21:03 +02:00
Robert Schulze
de2a0be025
Don't access static members through instance
- clang-tidy rightfully complains (-readability-static-accessed-through-instance)
- not going to enable the warning for now to avoid breaking the build
2024-04-03 18:50:33 +00:00
Nikolai Kochetov
04445b30ef Fix another logical error in group_by_use_nulls. 2024-04-03 11:50:14 +00:00
vdimir
71450c909a
Fix lambda(tuple(x), x + 1) syntax in analyzer 2024-04-03 10:39:43 +00:00
Dmitry Novik
40b9f39c00 Analyzer: Fix query parameters 2024-04-02 17:47:00 +02:00
Raúl Marín
c35a436435 Remove nested dependency on DateLutImpl 2024-04-02 14:45:48 +02:00
Raúl Marín
b2e764f633 Revert "Merge pull request #61564 from liuneng1994/optimize_in_single_value"
This reverts commit 20a45b4073, reversing
changes made to a642f4d3ec.
2024-04-01 13:51:56 +02:00
Nikolai Kochetov
697e72c13d
Merge pull request #61933 from ClickHouse/gb-use-null-analyzer-crashes
Fix some crashes with analyzer and group_by_use_nulls.
2024-03-29 19:29:55 +01:00
Nikolai Kochetov
c59961e980
Merge pull request #62046 from ClickHouse/fix-optimize_arithmetic_operations_in_aggregate_functions-function-type
Fix optimize_arithmetic_operations_in_aggregate_functions
2024-03-29 19:28:23 +01:00
Nikolai Kochetov
dc45666b4f
Merge pull request #62059 from ClickHouse/fix-type-after-IfChainToMultiIfPass
Ignore IfChainToMultiIfPass if returned type changed.
2024-03-29 19:26:55 +01:00
Nikolai Kochetov
45cac7e5c2
Merge pull request #62066 from ClickHouse/fix-convert-in-to-equals-type
Fix type for ConvertInToEqualPass
2024-03-29 19:26:28 +01:00
Nikolai Kochetov
fd01a12276 Fixing another case with grouping set 2024-03-28 18:26:15 +00:00
Nikolai Kochetov
8758d7f3a8 Fixing test. 2024-03-28 18:19:40 +00:00
Nikolai Kochetov
54d7a6041e Fix type for ConvertInToEqualPass 2024-03-28 17:35:38 +00:00
Nikolai Kochetov
9c411a2503 Merge branch 'master' into gb-use-null-analyzer-crashes 2024-03-28 16:44:08 +00:00
Nikolai Kochetov
482400cd28
Merge pull request #61998 from ClickHouse/fix-scalars-create-as-select
Fix scalars create as select
2024-03-28 17:35:50 +01:00
Nikolai Kochetov
c834a11b65 Ignore IfChainToMultiIfPass if returned type changed. 2024-03-28 16:32:12 +00:00
Nikolai Kochetov
fb235c0840 Fix optimize_arithmetic_operations_in_aggregate_functions optimization which could change result type. 2024-03-28 14:44:45 +00:00
Kruglov Pavel
facde7541f
Merge pull request #61567 from Avogar/fix-analyzer-group-by-use-nulls
Fix logical error in group_by_use_nulls + grouping set + analyzer + materialize/constant
2024-03-28 14:38:11 +01:00
Nikolai Kochetov
ce2e5a7d13 Fixing tests. 2024-03-27 19:25:07 +00:00
Nikolai Kochetov
3ce122ef20 Fixing tests. 2024-03-27 19:23:16 +00:00
Nikolai Kochetov
920ba121fe Fix scalars for CREATE AS SELECT for analyzer. 2024-03-27 19:17:41 +00:00
Nikolai Kochetov
dc52b81f5d Merge branch 'master' into gb-use-null-analyzer-crashes 2024-03-27 18:37:27 +00:00
Nikolai Kochetov
6127b0b899 Revert "Fix broken only_analyze in QueryAnalysisPass"
This reverts commit c88cb6be9d.
2024-03-27 17:43:27 +00:00
Nikolai Kochetov
6a7d48b932 Fix aliases. 2024-03-27 17:26:12 +00:00
Nikolai Kochetov
3b6ea659df Fixing 02535_analyzer_group_by_use_nulls 2024-03-26 19:10:34 +00:00
Dmitry Novik
65121b712e Merge remote-tracking branch 'origin/master' into enable-analyzer 2024-03-26 19:02:30 +01:00
Dmitry Novik
c88cb6be9d Fix broken only_analyze in QueryAnalysisPass 2024-03-26 17:46:38 +01:00
Nikolai Kochetov
2dee605d52 Merge branch 'master' into gb-use-null-analyzer-crashes 2024-03-26 13:05:03 +01:00
Nikolai Kochetov
277df60dc4 Fix some crashes with analyzer and group_by_use_nulls. 2024-03-26 12:01:17 +00:00
Nikolai Kochetov
f2e9ea2417
Merge pull request #61875 from ClickHouse/try-to-fix-02901_parallel_replicas_rollup-with-analyzer
Try to fix 02901_parallel_replicas_rollup with analyzer.
2024-03-26 11:12:29 +01:00
vdimir
802d6a2dac
Merge pull request #59007 from ClickHouse/vdimir/using_alias_followup
Analyzer: fixes for JOIN columns resolution
2024-03-26 10:36:50 +01:00
Nikolai Kochetov
3752b13753 See what would happen if constant fold _CAST for scalar subqueries properly. 2024-03-25 15:36:01 +00:00
Anton Popov
ef759ecdc2 Merge remote-tracking branch 'upstream/master' into HEAD 2024-03-25 14:56:50 +00:00
avogar
192d59e1ff Disable optimize_group_by_function_keys when group_by_use_nulls=1 2024-03-25 14:00:40 +00:00
Yarik Briukhovetskyi
20a45b4073
Merge pull request #61564 from liuneng1994/optimize_in_single_value
New analyzer pass to optimize in single value
2024-03-25 12:53:01 +01:00
Igor Nikonov
54c3bde6a7 Fix: DISTINCT in subquery with analyzer
RemoveUnusedProjectionColumnsPass incorrectly removed columns,
unused in outer query, from subqueries with DISTINCT
2024-03-24 21:20:51 +00:00
Dmitry Novik
64301191b1 Merge remote-tracking branch 'origin/master' into enable-analyzer 2024-03-24 21:07:26 +00:00
vdimir
0e7bedc671
Fix resolvedIdenfiersFromJoinAreEquals function visibility 2024-03-24 17:30:51 +00:00
Nikolai Kochetov
e6242891be Merge branch 'master' into fix-analyzer-group-by-use-nulls 2024-03-24 11:41:14 +00:00
vdimir
adbc9c66e9
fix infinite loop in ReplaceColumnsVisitor #ci_set_analyzer 2024-03-23 18:34:20 +00:00
vdimir
44f1f62904
fix ReplaceColumnsVisitor #ci_set_analyzer 2024-03-23 15:20:01 +00:00
vdimir
ee7d1cf7d9
another fix prewhere on join using column that changed type to supertype
tag: #ci_set_analyzer
2024-03-23 11:05:20 +00:00
vdimir
a1036075e0
Merge branch 'master' into vdimir/using_alias_followup 2024-03-22 20:16:26 +00:00
vdimir
5b7a3c276b
fix prewhere on join using column that changed type to supertype 2024-03-22 20:15:08 +00:00
Nikolai Kochetov
dd87e5793f Merge branch 'master' into fix-analyzer-group-by-use-nulls 2024-03-22 18:24:02 +00:00
Nikolai Kochetov
897f58e5dd Merge branch 'master' into fix-00223_shard_distributed_aggregation_memory_efficient-analyzer 2024-03-22 16:40:37 +01:00
Dmitry Novik
d43a1a1984 Merge remote-tracking branch 'origin/master' into enable-analyzer 2024-03-22 14:15:57 +01:00
Nikolai Kochetov
ec134d2642 Another attempt. 2024-03-22 10:51:01 +00:00
liuneng
6a550bc754 add test case and support constant expression 2024-03-22 11:23:59 +08:00
Nikolai Kochetov
89d80a4d65 Redo fix. 2024-03-21 18:16:31 +00:00
Alexey Milovidov
8670f1dc91
Merge pull request #61543 from ClickHouse/fix-regexp-recompilation-in-parser
Fix recompilation of regexps during backtracking in the parser
2024-03-21 21:15:17 +03:00
Anton Popov
fbd2273dd4 Merge remote-tracking branch 'upstream/master' into HEAD 2024-03-21 16:44:16 +00:00
Dmitry Novik
e4209218d4
Merge pull request #60497 from ClickHouse/analyzer-distr-json
Analyzer: Support different ObjectJSON on shards
2024-03-21 16:25:30 +01:00
vdimir
46ab53ef79
fix 2024-03-21 14:03:43 +00:00
Dmitry Novik
466cfe29b2 Fix tests with clickhouse-local #ci_set_analyzer 2024-03-21 15:01:08 +01:00
vdimir
15bf6d1d5f
Merge branch 'master' into vdimir/using_alias_followup 2024-03-21 10:39:18 +00:00
vdimir
e002e42805
remove old nodes from node_to_projection_name when node become nullable 2024-03-21 10:38:50 +00:00
vdimir
33169e72df
Fix AMBIGUOUS_IDENTIFIER with join_use_nulls
https://github.com/ClickHouse/ClickHouse/issues/59067#issuecomment-1912500556
2024-03-21 10:37:52 +00:00
vdimir
42d59a8fd1
Update after refactoring ALIAS columns computation 2024-03-21 09:16:58 +00:00
vdimir
add1613a50
Merge pull request #61631 from ClickHouse/vdimir/analyzer_join_using_unresolved_error_msg
Verbose error message about analyzer_compatibility_join_using_top_level_identifier
2024-03-21 10:12:25 +01:00
Antonio Andelic
5f067c16be
Merge pull request #61656 from ClickHouse/another-fix-for-sum-if-to-count-if-pass
Another fix for `SumIfToCountIfPass`
2024-03-21 08:49:19 +01:00
liuneng
ada4384deb fix ut failed 2024-03-21 10:38:51 +08:00
Alexey Milovidov
4d6709579b Fix error 2024-03-21 02:28:14 +01:00
Alexey Milovidov
99ed82d561 Merge branch 'master' into fix-regexp-recompilation-in-parser 2024-03-21 02:21:09 +01:00
avogar
355909eb3a Clean up 2024-03-20 14:54:07 +00:00
avogar
01c0af07aa Disable optimize_injective_functions_in_group_by when group_by_use_nulls=1 2024-03-20 14:49:43 +00:00
Antonio Andelic
a343406da4 Another fix for SumIfToCountIfPass 2024-03-20 15:33:45 +01:00
Yarik Briukhovetskyi
5ed895dbf5
remove whitespace before coma 2024-03-20 14:12:33 +01:00
Raúl Marín
c98634ad8c Merge remote-tracking branch 'blessed/master' into nested_includes 2024-03-20 14:08:10 +01:00
Nikolai Kochetov
624b3a6dbe Fixing 00223_shard_distributed_aggregation_memory_efficient with analyzer. 2024-03-20 12:08:46 +00:00
vdimir
25bae3e0a5
Verbose error medssage about analyzer_compatibility_join_using_top_level_identifier 2024-03-20 10:58:43 +00:00
liuneng
d2d5f3b323 add not in 2024-03-20 17:46:07 +08:00
liuneng
45bbef689a fix error for in Null 2024-03-20 12:29:48 +08:00
liuneng
862abf2f6e remove config 2024-03-20 10:40:22 +08:00
liuneng
a29d4f5db2 fix bug 2024-03-20 10:24:57 +08:00
Alexey Milovidov
cfab620f49 Fix bad code 2024-03-20 01:11:53 +01:00
Alexey Milovidov
82b18670a2 Fix error 2024-03-19 22:31:26 +01:00
avogar
bd7c13c1b6 Merge branch 'master' of github.com:ClickHouse/ClickHouse into fix-analyzer-group-by-use-nulls 2024-03-19 19:29:49 +00:00
Alexey Milovidov
a996155e83 Merge branch 'master' of github.com:ClickHouse/ClickHouse into fix-regexp-recompilation-in-parser 2024-03-19 19:56:11 +01:00
Dmitry Novik
221b74c77f Fix #ci_set_analyzer 2024-03-19 19:44:15 +01:00
Raúl Marín
de855ca917 Reduce header dependencies 2024-03-19 17:04:29 +01:00
Dmitry Novik
a8885e361e
Merge branch 'master' into vdimir/analyzer/join_using_parent_scope 2024-03-19 15:51:53 +01:00
avogar
462445c2c2 Fix logical error in group_by_use_nulls + analyzer + materialize/constant 2024-03-19 10:41:23 +00:00
liuneng
761c612295 fix style 2024-03-19 18:29:07 +08:00
liuneng
532d72a7d8 add test case 2024-03-19 17:30:16 +08:00
liuneng
a742b235a4 add pass covert in single value to equal 2024-03-19 17:12:13 +08:00
Alexey Milovidov
613c31038a Fix recompilation of regexps during backtracking in the parser 2024-03-18 18:40:47 +01:00
vdimir
dbed5d1902
Add analyzer_compatibility_join_using_top_level_identifier 2024-03-18 11:11:21 +00:00
vdimir
fbad9b799c
fix PREWHERE with join_use_nulls 2024-03-18 11:11:06 +00:00
vdimir
e27e6fb2f5
Analyzer: support join using column from select list 2024-03-18 11:11:00 +00:00
Robert Schulze
c17536c3b3
Enable clang-tidy in headers 2024-03-18 08:00:09 +00:00
Antonio Andelic
060f79862d Fix 2024-03-15 10:49:36 +00:00
Antonio Andelic
b000849529 Better 2024-03-14 18:21:21 +00:00
Anton Popov
7a0b8e27af Merge remote-tracking branch 'upstream/master' into HEAD 2024-03-14 16:58:14 +00:00
Antonio Andelic
22ca96cf8d Disable optimize_rewrite_sum_if_to_count_if if return is nullable 2024-03-14 16:05:01 +00:00
Nikolai Kochetov
6f31a77f70 Fix test 02174_cte_scalar_cache_mv 2024-03-08 15:33:45 +00:00
Nikolai Kochetov
00557a9c6c Merge branch 'master' into use-global-scalars-cache-analyzer 2024-03-08 12:30:04 +00:00
Dmitry Novik
526af77f4a
Merge pull request #60313 from ClickHouse/analyzer-refactor-constant-name
Analyzer: Refactor execution name for ConstantNode
2024-03-08 12:08:05 +01:00
Nikolai Kochetov
4c3fa4e864 Use global scalars cache in analyzer. 2024-03-08 09:43:57 +00:00
Anton Popov
f740afe71e Merge remote-tracking branch 'upstream/master' into HEAD 2024-03-07 18:36:42 +00:00
Nikolai Kochetov
97607f1031 Fix style 2024-03-07 17:06:45 +00:00
Nikolai Kochetov
2b8cf8b6e9 Merge branch 'master' into constant-folding-scalar-subqueries 2024-03-07 16:06:55 +00:00
Nikolai Kochetov
2db1876750 Fixing analyzer. 2024-03-07 15:42:45 +00:00
vdimir
de33af8e1a
Merge pull request #60875 from ZhiguoZh/20240305-analyzer-refactor
Refactor OptimizeDateOrDateTimeConverterWithPreimageVisitor
2024-03-07 15:58:31 +01:00
Dmitry Novik
23b33e5e32 Merge remote-tracking branch 'origin/master' into analyzer-refactor-constant-name 2024-03-07 14:18:44 +01:00
vdimir
21609a91e6
Merge pull request #60655 from ClickHouse/vdimir/analyzer/join_use_nulls_prewhere
Analyzer: Fix bug with join_use_nulls and PREWHERE
2024-03-07 13:28:00 +01:00
Dmitry Novik
71dc34074b
Merge pull request #60386 from ClickHouse/imp-analyzer-mask
Analyzer - improve hiding secret arguments.
2024-03-07 12:01:48 +01:00
Dmitry Novik
d92538ced2
Merge branch 'master' into analyzer-refactor-constant-name 2024-03-06 17:55:52 +01:00
vdimir
4dede601ef
fix 2024-03-06 12:10:26 +00:00
vdimir
d9f7ac8815
Analyzer: Fix bug with join_use_nulls and PREWHERE 2024-03-06 12:10:25 +00:00
Anton Popov
73d78e8ec2 Merge remote-tracking branch 'upstream/master' into HEAD 2024-03-05 16:18:44 +00:00
Dmitry Novik
55c028322d
Fix typo 2024-03-05 16:59:22 +01:00
Yakov Olkhovskiy
34f01c4a02 Merge branch 'master' into imp-analyzer-mask 2024-03-05 15:30:34 +00:00
Zhiguo Zhou
c4009a16f9 Refactor OptimizeDateOrDateTimeConverterWithPreimageVisitor
The generateOptimizedDateFilter function is refactored to enhance
the code readability. And this commit also fixes the duplicate
creations of ColumnNode.
2024-03-05 23:18:54 +08:00
Dmitry Novik
5524f5901f Cleanup code 2024-03-05 16:18:03 +01:00
Anton Popov
1da258bfda better functions to subcolumns optimization 2024-03-04 15:35:03 +00:00
Anton Popov
ba4d7c48af Merge remote-tracking branch 'upstream/master' into HEAD 2024-03-04 13:58:06 +00:00
Dmitry Novik
01829450fb Merge remote-tracking branch 'origin/master' into analyzer-refactor-constant-name 2024-03-04 14:12:15 +01:00
Yakov Olkhovskiy
aa42d5a88d separate FunctionSecretArgumentsFinder for AST and TreeNode to avoid binary bloat due to linkage dependencies 2024-03-01 20:58:22 +00:00
vdimir
47aa33408b
Resubmit "Analyzer: compute ALIAS columns right after reading"
This reverts commit 8141e1c3d1, reversing
changes made to fb099bbd62.
2024-03-01 14:53:02 +00:00
Alexander Tokmakov
2dedfd6cf9
Revert "Analyzer: compute ALIAS columns right after reading" 2024-02-29 14:22:07 +01:00
Dmitry Novik
814691bf78
Merge pull request #52230 from JackyWoo/optimize_aggregators_of_group_by_keys
New analyzer: add eliminate min/max/any/anyLast aggregators  pass
2024-02-29 11:46:26 +01:00
vdimir
5dd81f38fb
Merge pull request #59595 from ClickHouse/vdimir/analyzer/comute_alias_columns
Analyzer: compute ALIAS columns right after reading
2024-02-29 10:28:31 +01:00
Kruglov Pavel
a7eabbbe3a
Merge branch 'master' into variant-improvements 2024-02-28 17:38:54 +01:00
Dmitry Novik
d129bfd277 Merge remote-tracking branch 'origin/master' into optimize_aggregators_of_group_by_keys 2024-02-28 15:48:49 +00:00
Yakov Olkhovskiy
ad7715b2fa fix style 2024-02-27 23:12:29 +00:00
Yakov Olkhovskiy
d4b71748fc fix style 2024-02-27 22:38:41 +00:00
Yakov Olkhovskiy
802db19e3b dedicated FunctionSecretArgumentsFinder for TreeNode, refactoring of FunctionSecretArgumentsFinder 2024-02-27 20:42:02 +00:00
Dmitry Novik
33ae650e6a Merge remote-tracking branch 'origin/master' into analyzer-refactor-constant-name 2024-02-27 16:35:28 +01:00
Dmitry Novik
a2cabc9fe1 Fixup 2024-02-27 16:16:15 +01:00
Raúl Marín
f0354ee07f Fix optimization with nullable arguments 2024-02-27 16:15:21 +01:00
Raúl Marín
e81c2ede2a Add setting to control preimage optimization 2024-02-27 15:58:42 +01:00
Yakov Olkhovskiy
5ed09dc76b refactoring, add test 2024-02-27 14:58:17 +00:00
Dmitry Novik
6ad10629ff
Fix crash 2024-02-27 15:37:53 +01:00
Raúl Marín
f71f833c61 Fix terrible formatting 2024-02-27 13:38:50 +01:00
Yakov Olkhovskiy
4b858f167b consistent mask ids based on node hash, respect format_display_secrets_in_show_and_select setting 2024-02-27 05:52:07 +00:00
vdimir
5a9026f39b
Analyzer: compute ALIAS columns right after reading 2024-02-26 16:15:05 +00:00
Nikolai Kochetov
2b9889fb84
Merge pull request #60082 from amosbird/non-trivial-count-optimization
Refactor prewhere and primary key optimization
2024-02-26 16:17:24 +01:00
Dmitry Novik
42b91201a5 Merge remote-tracking branch 'origin/master' into analyzer-refactor-constant-name 2024-02-26 15:11:57 +00:00
Dmitry Novik
32c63cc57a Fix style 2024-02-26 15:02:06 +00:00
Dmitry Novik
96dff28a96 Update comment 2024-02-26 14:17:05 +00:00
Dmitry Novik
848d4009e6 Rewrite implementation 2024-02-26 14:14:30 +00:00
Robert Schulze
5c967c44de
Merge pull request #60248 from ClickHouse/revert-59450-order-by-all-ambiguities
Revert "Replace `ORDER BY ALL` by `ORDER BY *`"
2024-02-26 10:23:41 +01:00
Amos Bird
207d36d7c1
Make it work 2024-02-26 02:31:58 +08:00
Amos Bird
6137914604
Fix most tests 2024-02-26 02:31:58 +08:00
Amos Bird
7435568a0d
Fix tests 2024-02-26 02:31:57 +08:00
Yakov Olkhovskiy
ab6ab8bfac replace only secret arguments with [HIDDEN], also hide it in TreeNode dump 2024-02-25 17:11:22 +00:00
avogar
39ad054e94 Merge branch 'master' of github.com:ClickHouse/ClickHouse into variant-improvements 2024-02-23 18:59:34 +00:00
Dmitry Novik
600d020379 Merge remote-tracking branch 'origin/master' into optimize_aggregators_of_group_by_keys 2024-02-23 16:07:28 +00:00
Nikolai Kochetov
83841c23d3
Merge pull request #60230 from ClickHouse/fix-analyzer-secrets
Fix analyzer - hide arguments for secret functions
2024-02-23 15:26:49 +01:00
Dmitry Novik
601c3c33bc Set correct execution name for ConstantNode 2024-02-22 17:44:41 +01:00
Robert Schulze
7930c2a993
Better! 2024-02-21 20:31:49 +00:00
Robert Schulze
52afa46e23
Revert "Replace ORDER BY ALL by ORDER BY *" 2024-02-21 19:05:20 +01:00
Nikolai Kochetov
0e9d7f3540
Merge pull request #60037 from ClickHouse/fix-01656_test_query_log_factories_info-for-analyzer
Fix 01656_test_query_log_factories_info with analyzer.
2024-02-21 17:37:15 +01:00
Yakov Olkhovskiy
b55aef9091 hash argument projection names for secret functions 2024-02-21 14:53:01 +00:00
avogar
bd2390996e Merge branch 'master' of github.com:ClickHouse/ClickHouse into variant-improvements 2024-02-21 13:16:07 +01:00
avogar
16e8e5af8d Clean up 2024-02-20 19:00:15 +00:00
avogar
122dc6769d Fixes and improvements for Variant type 2024-02-20 18:58:06 +00:00
Nikolai Kochetov
37b85360e1
Update CNF.cpp 2024-02-20 13:15:34 +01:00
Robert Schulze
6f6e74ad8b
Merge remote-tracking branch 'rschu1ze/master' into order-by-all-ambiguities 2024-02-19 15:19:13 +00:00
Robert Schulze
8f5a4d92a1
Fix style 2024-02-19 15:19:04 +00:00
Dmitry Novik
11970ddf82
Merge branch 'master' into analyzer-fix-test_select_table_name_from_merge_over_distributed 2024-02-19 14:07:58 +01:00
Dmitry Novik
2122454576 Temporary progress 2024-02-19 12:41:29 +00:00
Alexey Milovidov
232fe0dd1b Fix inconsistent formatting of SELECT ... FROM (EXPLAIN ...) 2024-02-18 05:38:34 +01:00
Dmitry Novik
a3c34a7cc2
Merge pull request #54211 from ClickHouse/Support_parameterized_view_with_analyzer
Refactor parameterized view & add support for new analyzer
2024-02-16 16:13:49 +01:00
Dmitry Novik
2b02bcd67b
Merge pull request #59926 from azat/analyzer/NormalizeCountVariantsVisitor-fix
Do not rewrite sum() to count() if return value differs in analyzer
2024-02-16 09:16:46 +01:00
Nikolai Kochetov
ef7e8e0c5d Fixing style. 2024-02-15 17:35:44 +00:00
Nikolai Kochetov
365530c463 Fix 01656_test_query_log_factories_info with analyzer. 2024-02-15 17:12:22 +00:00
Dmitry Novik
8397b856ae Cleanup 2024-02-15 17:28:54 +01:00
Dmitry Novik
dfaea604c3 Remove redundant includes 2024-02-15 17:27:26 +01:00
Robert Schulze
058461e786
Merge remote-tracking branch 'rschu1ze/master' into order-by-all-ambiguities 2024-02-15 16:21:16 +00:00
Robert Schulze
1edf3b2254
Replace ORDER BY ALL by ORDER BY * to get rid of ambiguities 2024-02-15 16:19:56 +00:00
Dmitry Novik
a11b9553ca Fix implementation in new analyzer 2024-02-15 17:16:27 +01:00
Azat Khuzhin
504a2dd9d9 Do not rewrite sum() to count() if return value differs in analyzer
v2: fix for LowCardinality
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-02-15 12:41:05 +01:00
Alexey Milovidov
b73c9ce9f5
Merge pull request #59981 from ClickHouse/analyzer-fix-test_storage_rabbitmq
Analyzer: Fix test_storage_rabbitmq
2024-02-15 02:58:09 +01:00
Dmitry Novik
e95726f57c Analyzer: Fix test_shard_level_const_function 2024-02-14 13:21:23 +00:00
Dmitry Novik
12963ce53e Analyzer: Fix test_storage_rabbitmq 2024-02-14 12:20:37 +00:00
Kruglov Pavel
48a3b8e675
Merge pull request #58292 from ucasfl/negtive-position
Resubmit: Support negtive position arguments
2024-02-13 18:35:28 +01:00
Smita Kulkarni
8f71d7817c Fix clang build 2024-02-13 14:57:45 +01:00
Smita Kulkarni
d7056d642d Addressed review comments 2024-02-13 13:53:40 +01:00
Smita Kulkarni
3526d7982c Merge branch 'master' into Support_parameterized_view_with_analyzer 2024-02-13 13:08:35 +01:00
Azat Khuzhin
7c01705231 Run ValidationChecker for sanitizers build as well
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-02-13 10:50:45 +01:00
Dmitry Novik
1dfecd5e6c Merge remote-tracking branch 'origin' into analyzer-fix-const-fold 2024-02-09 11:57:23 +01:00
Antonio Andelic
160f1b7fd8 Fix logical optimizer with LowCardinality 2024-02-08 15:01:56 +01:00
Dmitry Novik
b8f74b5b05
Merge pull request #50894 from ClickHouse/storage-merge-aliases-analyzer
Analyzer: support aliases and distributed JOINs in StorageMerge
2024-02-08 11:22:00 +01:00
Anton Popov
361b5a2077 more refactoring of FunctionToSubcolumnsPass 2024-02-07 18:19:15 +00:00
Dmitry Novik
d558728281
Merge branch 'master' into storage-merge-aliases-analyzer 2024-02-06 20:24:20 +01:00
Anton Popov
46f6867896 refactor FunctionToSubcolumnsPass 2024-02-06 17:37:02 +00:00
Raúl Marín
e10e105ec1 Merge remote-tracking branch 'blessed/master' into more_sanity_checks 2024-02-06 17:42:36 +01:00
Raúl Marín
5d042dc815 Check pointer 2024-02-06 17:42:24 +01:00
Anton Popov
66b39b11a2 Merge remote-tracking branch 'upstream/master' into HEAD 2024-02-06 15:33:16 +00:00
vdimir
3642bbc05c
Merge pull request #59483 from ClickHouse/vdimir/analyzer/00917_multiple_joins_denny_crane
Analyzer: Fix denny_crane
2024-02-06 10:17:27 +01:00
Raúl Marín
40885d7f16 Add extra sanity check 2024-02-05 21:51:26 +01:00
vdimir
d3123438c7
Merge pull request #59382 from ClickHouse/vdimir/analyzer/fix_array_join_subcolumn
Fix ARRAY JOIN with subcolumns
2024-02-05 17:27:59 +01:00
vdimir
9b5ea7bb8a
Analyzer: Fix 00917_multiple_joins_denny_crane 2024-02-05 16:25:13 +00:00
Dmitry Novik
7d62e224b5
Pass correct Context 2024-02-05 15:31:42 +01:00
Robert Schulze
dd484fc312
Simplify what happens in SELECT all, ... [...] ORDER BY ALL
Previously setting `enable_order_by_all` distinguished for ORDER BY ALL
whether we should sort by column 'all' (if given in the SELECT clause)
or by all columns. The actual behavior was not always intuitive.

Now, we throw unconditionally an exception which also simplifies the
handling a bit. Only an edge case is affected and if users really want
to run ORDER BY ALL on a column names 'all', they can alias it.
2024-02-02 09:53:35 +00:00
Robert Schulze
82a4fa0dfc
Smaller fixups 2024-02-01 11:58:43 +00:00
zhongyuankai
d076b13ac8 order by all doesn't work for select * 2024-02-01 18:51:54 +08:00
vdimir
a043227685
Fix ARRAY JOIN with subcolumns in analyzer 2024-02-01 10:36:31 +00:00
Dmitry Novik
0d21004218 WIP on StorageMerge 2024-01-31 13:50:15 +00:00
Dmitry Novik
722f3db738 Merge remote-tracking branch 'origin/master' into storage-merge-aliases-analyzer 2024-01-30 19:50:01 +00:00
Dmitry Novik
ff71973536 Merge remote-tracking branch 'origin/master' into analyzer-fix-const-fold 2024-01-30 18:43:47 +00:00
Dmitry Novik
5a024dfc09
Merge pull request #59117 from ClickHouse/fix-analyzer-order-by-all
Followup 57875
2024-01-30 15:54:18 +01:00
Dmitry Novik
c339a74ac3
Merge pull request #59177 from ClickHouse/fix-analyzer-cte-resolve
Analyzer: Fix CTE name clash resolution
2024-01-30 08:13:38 +01:00
flynn
4f12ca249d Fix typo 2024-01-30 07:01:07 +00:00
flynn
9858c41849 Merge branch 'master' of github.com:ClickHouse/ClickHouse into negtive-position 2024-01-30 04:03:35 +00:00
flynn
0ded580011 Fix 2024-01-30 04:03:27 +00:00
avogar
5833641fa5 Merge branch 'master' of github.com:ClickHouse/ClickHouse into variant-data-type 2024-01-26 16:54:02 +00:00