Skip to content

Primary key, MergeTreeIndexFullText and MergeTreeIndexSet support for string functions#5965

Merged
alexey-milovidov merged 6 commits intoClickHouse:masterfrom
dimarub2000:master
Jul 16, 2019
Merged

Primary key, MergeTreeIndexFullText and MergeTreeIndexSet support for string functions#5965
alexey-milovidov merged 6 commits intoClickHouse:masterfrom
dimarub2000:master

Conversation

@dimarub2000
Copy link
Contributor

@dimarub2000 dimarub2000 commented Jul 10, 2019

I hereby agree to the terms of the CLA available at: https://yandex.ru/legal/cla/?lang=en

For changelog. Remove if this is non-significant change.

Category (leave one):

  • New Feature

Short description (up to few sentences):
Added support startsWith, endsWith, multiSearchAny, notLike for MergeTreeIndexFullText.
Added support startsWith, endsWith, multiSearchAny for MergeTreeIndexSet.
Added support empty, notEmpty, notLike for Primary key.

@dimarub2000 dimarub2000 added the do not test disable testing on pull request label Jul 11, 2019
@dimarub2000 dimarub2000 added can be tested and removed do not test disable testing on pull request labels Jul 12, 2019
@dimarub2000 dimarub2000 changed the title [WIP] Primary key and MergeTreeIndexFullText support for string functions [WIP] Primary key, MergeTreeIndexFullText and MergeTreeIndexSet support for string functions Jul 12, 2019
@dimarub2000 dimarub2000 changed the title [WIP] Primary key, MergeTreeIndexFullText and MergeTreeIndexSet support for string functions Primary key, MergeTreeIndexFullText and MergeTreeIndexSet support for string functions Jul 12, 2019
@dimarub2000
Copy link
Contributor Author

I have a test for primary key as well, should I add it after checks are completed?

}
},
{
"startsWith",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's unify equals, startsWith, endsWith with static free function.

{
out.function = RPNElement::FUNCTION_MULTI_SEARCH;

std::vector<std::vector<BloomFilter>> bloom_filters;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't understand, why we need 2d array?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, it's for FUNCTION_IN, where it can apply for tuples:
(a, b) IN ((a1, b1), (a2, b2)...)

Maybe better to add a comment.


size_t key_arg_pos; /// Position of argument with key column (non-const argument)
size_t key_column_num = -1; /// Number of a key column (inside key_column_names array)
std::string func_name = func->name;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const reference?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-feature Pull request with new product feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants