Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add function repeat #6999

Merged
merged 3 commits into from
Sep 23, 2019
Merged

Add function repeat #6999

merged 3 commits into from
Sep 23, 2019

Conversation

ucasfl
Copy link
Collaborator

@ucasfl ucasfl commented Sep 19, 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):

Add function repeat related to issue-6648

Detailed description (optional):

repeat function has two arguments, the first argument is String and the second is unsigned integer, both of them can be constant or nonconstant. So, we can use this function as follows:

SELECT repeat('abc', 10);
DROP TABLE IF EXISTS defaults;
CREATE TABLE defaults
(
        strings String,
        u64 UInt64
)ENGINE = Memory();

INSERT INTO defaults values ('abc', 56) ('sdfgg', 200) ('xywq', 4) ('plkf', 0);

SELECT repeat(strings, u64) FROM defaults;
SELECT repeat(strings, 10) FROM defaults;
SELECT repeat('abc', u64) FROM defaults;

fenglv and others added 2 commits September 22, 2019 14:25
@alexey-milovidov
Copy link
Member

Now it's ready for merge!
I've made a few edits in #7048

@amosbird
Copy link
Collaborator

it's #7049 btw

@alexey-milovidov alexey-milovidov merged commit 61b0259 into ClickHouse:master Sep 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants