ClickHouse/tests/queries/0_stateless/02498_analyzer_settings_push_down.reference

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

121 lines
4.1 KiB
Plaintext
Raw Normal View History

2022-12-08 12:31:46 +00:00
-- { echoOn }
SELECT value FROM (SELECT tupleElement(value, 'a') AS value FROM test_table);
0
EXPLAIN QUERY TREE SELECT value FROM (
SELECT tupleElement(value, 'a') AS value FROM test_table
);
QUERY id: 0
PROJECTION COLUMNS
value UInt64
PROJECTION
LIST id: 1, nodes: 1
COLUMN id: 2, column_name: value, result_type: UInt64, source_id: 3
JOIN TREE
QUERY id: 3, is_subquery: 1
PROJECTION COLUMNS
value UInt64
PROJECTION
LIST id: 4, nodes: 1
FUNCTION id: 5, function_name: tupleElement, function_type: ordinary, result_type: UInt64
ARGUMENTS
LIST id: 6, nodes: 2
COLUMN id: 7, column_name: value, result_type: Tuple(a UInt64), source_id: 8
CONSTANT id: 9, constant_value: \'a\', constant_value_type: String
JOIN TREE
TABLE id: 8, table_name: default.test_table
SELECT '--';
--
EXPLAIN QUERY TREE SELECT value FROM (
SELECT tupleElement(value, 'a') AS value FROM test_table
) SETTINGS optimize_functions_to_subcolumns = 1;
QUERY id: 0
PROJECTION COLUMNS
value UInt64
PROJECTION
LIST id: 1, nodes: 1
COLUMN id: 2, column_name: value, result_type: UInt64, source_id: 3
JOIN TREE
QUERY id: 3, is_subquery: 1
PROJECTION COLUMNS
value UInt64
PROJECTION
LIST id: 4, nodes: 1
COLUMN id: 5, column_name: value.a, result_type: UInt64, source_id: 6
JOIN TREE
TABLE id: 6, table_name: default.test_table
SETTINGS optimize_functions_to_subcolumns=1
2022-12-08 12:31:46 +00:00
SELECT '--';
--
EXPLAIN QUERY TREE SELECT value FROM (
SELECT tupleElement(value, 'a') AS value FROM test_table SETTINGS optimize_functions_to_subcolumns = 0
) SETTINGS optimize_functions_to_subcolumns = 1;
QUERY id: 0
PROJECTION COLUMNS
value UInt64
PROJECTION
LIST id: 1, nodes: 1
COLUMN id: 2, column_name: value, result_type: UInt64, source_id: 3
JOIN TREE
QUERY id: 3, is_subquery: 1
PROJECTION COLUMNS
value UInt64
PROJECTION
LIST id: 4, nodes: 1
FUNCTION id: 5, function_name: tupleElement, function_type: ordinary, result_type: UInt64
ARGUMENTS
LIST id: 6, nodes: 2
COLUMN id: 7, column_name: value, result_type: Tuple(a UInt64), source_id: 8
CONSTANT id: 9, constant_value: \'a\', constant_value_type: String
JOIN TREE
TABLE id: 8, table_name: default.test_table
SETTINGS optimize_functions_to_subcolumns=0
SETTINGS optimize_functions_to_subcolumns=1
2022-12-08 12:31:46 +00:00
SELECT '--';
--
EXPLAIN QUERY TREE SELECT value FROM (
SELECT tupleElement(value, 'a') AS value FROM test_table
) SETTINGS optimize_functions_to_subcolumns = 0;
QUERY id: 0
PROJECTION COLUMNS
value UInt64
PROJECTION
LIST id: 1, nodes: 1
COLUMN id: 2, column_name: value, result_type: UInt64, source_id: 3
JOIN TREE
QUERY id: 3, is_subquery: 1
PROJECTION COLUMNS
value UInt64
PROJECTION
LIST id: 4, nodes: 1
FUNCTION id: 5, function_name: tupleElement, function_type: ordinary, result_type: UInt64
ARGUMENTS
LIST id: 6, nodes: 2
COLUMN id: 7, column_name: value, result_type: Tuple(a UInt64), source_id: 8
CONSTANT id: 9, constant_value: \'a\', constant_value_type: String
JOIN TREE
TABLE id: 8, table_name: default.test_table
SETTINGS optimize_functions_to_subcolumns=0
2022-12-08 12:31:46 +00:00
SELECT '--';
--
EXPLAIN QUERY TREE SELECT value FROM (
SELECT tupleElement(value, 'a') AS value FROM test_table SETTINGS optimize_functions_to_subcolumns = 1
) SETTINGS optimize_functions_to_subcolumns = 0;
QUERY id: 0
PROJECTION COLUMNS
value UInt64
PROJECTION
LIST id: 1, nodes: 1
COLUMN id: 2, column_name: value, result_type: UInt64, source_id: 3
JOIN TREE
QUERY id: 3, is_subquery: 1
PROJECTION COLUMNS
value UInt64
PROJECTION
LIST id: 4, nodes: 1
COLUMN id: 5, column_name: value.a, result_type: UInt64, source_id: 6
JOIN TREE
TABLE id: 6, table_name: default.test_table
SETTINGS optimize_functions_to_subcolumns=1
SETTINGS optimize_functions_to_subcolumns=0