ClickHouse/tests/queries/0_stateless/01590_countSubstrings.reference
Azat Khuzhin 838596c7a4 Implement countSubstrings()
Function to count number of substring occurrences in the string:
- in case of needle is multi char - counts non-intersecting substrings
- the code is based on position helpers.

The following new functions is available:
- countSubstrings()
- countSubstringsCaseInsensitive()
- countSubstringsCaseInsensitiveUTF8()

v0: substringCount()

v2:
- add substringCountCaseInsensitiveUTF8
- improve tests
- fix coding style issues
- fix multichar needle

v3: rename to countSubstrings (by analogy with countEqual())
2020-11-26 22:58:16 +03:00

112 lines
941 B
Plaintext

# countSubstrings
CountSubstringsImpl::constantConstant
CountSubstringsImpl::constantConstantScalar
empty
0
0
0
char
1
2
3
word
1
1
1
2
3
intersect
2
CountSubstringsImpl::vectorVector
1
4
6
"intersect",4
CountSubstringsImpl::constantVector
2
1
0
3
5
"intersect",4
CountSubstringsImpl::vectorConstant
0
1
2
3
4
"intersect",4
# countSubstringsCaseInsensitive
CountSubstringsImpl::constantConstant
CountSubstringsImpl::constantConstantScalar
char
1
2
3
word
1
1
1
2
3
intersect
2
CountSubstringsImpl::vectorVector
1
3
5
CountSubstringsImpl::constantVector
2
1
0
3
5
CountSubstringsImpl::vectorConstant
1
0
0
# countSubstringsCaseInsensitiveUTF8
CountSubstringsImpl::constantConstant
CountSubstringsImpl::constantConstantScalar
char
1
2
3
word
1
1
1
2
3
intersect
2
CountSubstringsImpl::vectorVector
1
3
5
"intersect",4
CountSubstringsImpl::constantVector
2
3
5
"intersect",4
CountSubstringsImpl::vectorConstant
1
0
"intersect",4