ClickHouse/tests/queries/0_stateless/02504_regexp_dictionary_yaml_source.reference
johanngan bcb058f999 Add case insensitive and dot-all modes to RegExpTree dictionary
The new per-dictionary settings control regex match semantics around
case sensitivity and the '.' wildcard with newlines. They must be set at
the dictionary level since they're applied to regex engines at
pattern-compile-time.

- regexp_dict_flag_case_insensitive: case insensitive matching
- regexp_dict_flag_dotall: '.' matches all characters including newlines

They correspond to HS_FLAG_CASELESS and HS_FLAG_DOTALL in Vectorscan
and case_sensitive and dot_nl in RE2. These are the most useful options
compatible with the internal behavior of RegExpTreeDictionary around
splitting up simple and complex patterns between Vectorscan and RE2.

The alternative is to use (?i) and/or (?s) for all patterns. However,
(?s) isn't handled properly by OptimizedRegularExpression::analyze().
And while (?i) is, it still causes the dictionary to treat the pattern
as "complex" for sequential scanning with RE2 rather than multi-matching
with Vectorscan, even though Vectorscan supports case insensitive
literal matching. Setting dictionary-wide flags is both more convenient,
and circumvents these problems.
2023-09-06 11:28:53 -05:00

42 lines
1.3 KiB
Plaintext

('TencentOS','123.45.67')
('Android','12')
('Android','default')
('Android','default')
('BlackBerry WebKit','10.0')
('BlackBerry WebKit','1.0')
(true,'61f0c404-5cb3-11e7-907b-a6006ad3dba0','2023-01-01','2023-01-01 01:01:01',[1,2,3,-1,-2,-3])
(['ClickHouse'],[1],[],[])
(['ClickHouse'],[1],[],[])
(['ClickHouse Documentation','ClickHouse','Documentation'],[0,1,2],['/en'],['ClickHouse'])
(['ClickHouse Documentation','ClickHouse'],[0,1],['/en'],['ClickHouse'])
(['Documentation','GitHub'],[2,3],[NULL],[])
(['Documentation','GitHub'],[2,3],[NULL],[])
ClickHouse
['ClickHouse']
ClickHouse Documentation
['ClickHouse Documentation','ClickHouse','Documentation']
GitHub Documentation
['GitHub Documentation','GitHub']
Documentation
['Documentation']
ClickHouse
['ClickHouse']
ClickHouse Documentation
['ClickHouse Documentation','ClickHouse','Documentation']
GitHub Documentation
['GitHub Documentation','GitHub']
Documentation
['Documentation']
['foo','(?i)foo','(?-i)foo']
['(?i)foo']
['hello.*world','(?i)hello.*world','(?-i)hello.*world']
[]
['(?i)hello.*world']
[]
['foo','(?i)foo','(?-i)foo']
['foo','(?i)foo']
['hello.*world','(?i)hello.*world','(?-i)hello.*world']
['hello.*world','(?i)hello.*world','(?-i)hello.*world']
['hello.*world','(?i)hello.*world']
['hello.*world','(?i)hello.*world']