Skip to content

Commit

Permalink
Fix more tests with analyzer.
Browse files Browse the repository at this point in the history
  • Loading branch information
KochetovNicolai committed Nov 3, 2023
1 parent a40cc39 commit 40c2329
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 8 deletions.
2 changes: 0 additions & 2 deletions tests/analyzer_tech_debt.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
02139_MV_with_scalar_subquery
02174_cte_scalar_cache_mv
02302_s3_file_pruning
02341_global_join_cte
02345_implicit_transaction
02352_grouby_shadows_arg
02354_annoy
Expand All @@ -50,7 +49,6 @@
02521_aggregation_by_partitions
02554_fix_grouping_sets_predicate_push_down
02575_merge_prewhere_different_default_kind
02713_array_low_cardinality_string
02003_WithMergeableStateAfterAggregationAndLimit_LIMIT_BY_LIMIT_OFFSET
01009_global_array_join_names
00917_multiple_joins_denny_crane
Expand Down
7 changes: 6 additions & 1 deletion tests/queries/0_stateless/02341_global_join_cte.reference
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
-- { echo }
with rhs as (select * from remote('127.{1,2}', view(select dummy d1, dummy d2 from system.one))) select lhs.d2 from remote('127.{1,2}', view(select dummy d1, dummy d2 from system.one)) lhs global join rhs using (d1) order by rhs.d2; -- { serverError ALIAS_REQUIRED }
with rhs as (select * from remote('127.{1,2}', view(select dummy d1, dummy d2 from system.one))) select lhs.d2 from remote('127.{1,2}', view(select dummy d1, dummy d2 from system.one)) lhs global join rhs using (d1) order by rhs.d2 settings allow_experimental_analyzer=0; -- { serverError ALIAS_REQUIRED }
with rhs as (select * from remote('127.{1,2}', view(select dummy d1, dummy d2 from system.one))) select lhs.d2 from remote('127.{1,2}', view(select dummy d1, dummy d2 from system.one)) lhs global join rhs using (d1) order by rhs.d2 settings allow_experimental_analyzer=1; -- It works with analyzer; rhs is an alias itself.
0
0
0
0
with rhs as (select * from remote('127.{1,2}', view(select dummy d1, dummy d2 from system.one))) select lhs.d2 from remote('127.{1,2}', view(select dummy d1, dummy d2 from system.one)) lhs global join rhs using (d1) order by rhs.d2 settings joined_subquery_requires_alias=0;
0
0
Expand Down
3 changes: 2 additions & 1 deletion tests/queries/0_stateless/02341_global_join_cte.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
-- { echo }
with rhs as (select * from remote('127.{1,2}', view(select dummy d1, dummy d2 from system.one))) select lhs.d2 from remote('127.{1,2}', view(select dummy d1, dummy d2 from system.one)) lhs global join rhs using (d1) order by rhs.d2; -- { serverError ALIAS_REQUIRED }
with rhs as (select * from remote('127.{1,2}', view(select dummy d1, dummy d2 from system.one))) select lhs.d2 from remote('127.{1,2}', view(select dummy d1, dummy d2 from system.one)) lhs global join rhs using (d1) order by rhs.d2 settings allow_experimental_analyzer=0; -- { serverError ALIAS_REQUIRED }
with rhs as (select * from remote('127.{1,2}', view(select dummy d1, dummy d2 from system.one))) select lhs.d2 from remote('127.{1,2}', view(select dummy d1, dummy d2 from system.one)) lhs global join rhs using (d1) order by rhs.d2 settings allow_experimental_analyzer=1; -- It works with analyzer; rhs is an alias itself.
with rhs as (select * from remote('127.{1,2}', view(select dummy d1, dummy d2 from system.one))) select lhs.d2 from remote('127.{1,2}', view(select dummy d1, dummy d2 from system.one)) lhs global join rhs using (d1) order by rhs.d2 settings joined_subquery_requires_alias=0;
with rhs_ as (select * from remote('127.{1,2}', view(select dummy d1, dummy d2 from system.one))) select lhs.d2 from remote('127.{1,2}', view(select dummy d1, dummy d2 from system.one)) lhs global join rhs_ rhs using (d1) order by rhs.d2 settings joined_subquery_requires_alias=0;
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
tab idx bloom_filter
---
Expression ((Projection + Before ORDER BY))
Filter (WHERE)
ReadFromMergeTree (default.tab)
Expression
Filter
ReadFromMergeTree
Indexes:
Skip
Name: idx
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ WHERE database = currentDatabase() AND table = 'tab';

SELECT '---';

EXPLAIN indexes = 1 SELECT * FROM tab WHERE has(foo, 'b');
EXPLAIN indexes = 1, description=0 SELECT * FROM tab WHERE has(foo, 'b');

DROP TABLE tab;

0 comments on commit 40c2329

Please sign in to comment.