ClickHouse / ClickHouse/ClickHouse

The new analyzer is enabled, but the old interpreter is used.

Open
#74,532 2 comments 3 reactions 1 assignee Claimed by @vdimir View on GitHub
analyzer comp-query-analyzer external unfinished code
Dominant language
C++
Stars
49.9k
Forks
9k
Avg merge
21h 32m
Merged PRs (30d)
515

Description

**Describe what's wrong**

The new analyzer is enabled, but the old interpreter is used. Simple MergeTree with simple `SELECT COUNT() WHERE col = val` query.

https://fiddle.clickhouse.com/40f154d8-c241-4927-a1de-e34f70faec7a

**Does it reproduce on the most recent release?**

Tested on 24.12.2.29.

**Expected behavior**

New analyzer should be used.

**Error message and/or stacktrace**

```
executeQuery: (from 127.0.0.1:51158) SELECT count() FROM test_strings WHERE REG_NUMBER = 'Reg_9001'; (stage: Complete)
CancellationChecker: Did not add the task because the timeout is 0. Query: SELECT count() FROM test_strings WHERE REG_NUMBER = 'Reg_9001';
Planner: Query to stage Complete
Planner: Query from stage FetchColumns to stage Complete
QueryPlanOptimizePrewhere: The min valid primary key position for moving to the tail of PREWHERE is -1
IInterpreterUnionOrSelectQuery: The new analyzer is enabled, but the old interpreter is used. It can be a bug, please report it. Will disable 'allow_experimental_analyzer' setting (for query: SELECT min(COUNTRY), max(COUNTRY), count() SETTINGS aggregate_functions_null_for_empty = false, transform_null_in = false, legacy_column_name_of_tuple_literal = false)
default.test_strings (2eb4cbb1-387c-4262-8565-b9610d23151d) (SelectExecutor): Key condition: unknown
default.test_strings (2eb4cbb1-387c-4262-8565-b9610d23151d) (SelectExecutor): Filtering marks by primary and secondary keys
default.test_strings (2eb4cbb1-387c-4262-8565-b9610d23151d) (SelectExecutor): Selected 3/3 parts by partition key, 3 parts by primary key, 159/159 marks by primary key, 159 marks to read from 3 ranges
default.test_strings (2eb4cbb1-387c-4262-8565-b9610d23151d) (SelectExecutor): Spreading mark ranges among streams (default reading)
default.test_strings (2eb4cbb1-387c-4262-8565-b9610d23151d) (SelectExecutor): Reading approx. 1300000 rows with 7 streams
Aggregator: Aggregation method: without_key
AggregatingTransform: Aggregated. 0 to 1 rows (from 0.00 B) in 0.003858874 sec. (0.000 rows/sec., 0.00 B/sec.)
Aggregator: Aggregation method: without_key
AggregatingTransform: Aggregated. 0 to 1 rows (from 0.00 B) in 0.004815189 sec. (0.000 rows/sec., 0.00 B/sec.)
Aggregator: Aggregation method: without_key
AggregatingTransform: Aggregated. 0 to 1 rows (from 0.00 B) in 0.005387781 sec. (0.000 rows/sec., 0.00 B/sec.)
Aggregator: Aggregation method: without_key
AggregatingTransform: Aggregated. 0 to 1 rows (from 0.00 B) in 0.006055392 sec. (0.000 rows/sec., 0.00 B/sec.)
AggregatingTransform: Aggregating
Aggregator: Aggregation method: without_key
Aggregator: Aggregation method: without_key
AggregatingTransform: Aggregated. 1 to 1 rows (from 0.00 B) in 0.007084438 sec. (141.154 rows/sec., 0.00 B/sec.)
AggregatingTransform: Aggregated. 0 to 1 rows (from 0.00 B) in 0.007097167 sec. (0.000 rows/sec., 0.00 B/sec.)
Aggregator: Aggregation method: without_key
AggregatingTransform: Aggregated. 0 to 1 rows (from 0.00 B) in 0.00773152 sec. (0.000 rows/sec., 0.00 B/sec.)
Aggregator: Merging aggregated data
HashTablesStatistics: Statistics updated for key=17271938982147527640: new sum_of_sizes=7, median_size=1
executeQuery: Read 1300000 rows, 23.74 MiB in 0.009988 sec., 130156187.42490989 rows/sec., 2.32 GiB/sec.
MemoryTracker: Query peak memory usage: 762.72 KiB.
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.