Using match with ^$
as anchors on a primary key column returns incorrect results
#53222
Labels
^$
as anchors on a primary key column returns incorrect results
#53222
Describe what's wrong
When running a query that applies a regex expression to the primary key column and uses
^$
as anchors on the first element, Clickhouse incorrectly returns only a portion of the expected results.Does it reproduce on recent release?
Running release
23.3.8.21
.How to reproduce
Create table and insert data into different parts. Note that this bug appears to apply to only the primary key condition as inserting both data items into same part will return the correct result.
Reading data with
^$
returns only the 1/2 expected rows:Running the query with index explain enabled (
EXPLAIN indexes = 1
) shows the problem right away:Additional context
A simple workaround is to use
\A\z
for anchoring which returns the expected results:The text was updated successfully, but these errors were encountered: