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

freeze_by_part_where got an error #855

Closed
and1990 opened this issue Mar 1, 2024 · 2 comments · Fixed by #843
Closed

freeze_by_part_where got an error #855

and1990 opened this issue Mar 1, 2024 · 2 comments · Fixed by #843
Assignees
Milestone

Comments

@and1990
Copy link

and1990 commented Mar 1, 2024

Hi, I appreciate that you offered this such an excellent tool. Thanks.

When I back up some specific partitions with 'freeze_by_part_where', I got an error, the message is below.

error can't get partitions for 'solar.events': code: 62, message: Syntax error: failed at position 94 ('name'): name LIKE '02a5d0453f5f69f16493f3074ef4b183' || '%' AND active = 1. Expected one of: token, DoubleColon, OR, AND, IS NOT DISTINCT FROM, IS NULL, IS NOT NULL, BETWEEN, NOT BETWEEN, LIKE, ILIKE, NOT LIKE, NOT ILIKE, REGEXP, IN, NOT IN, GLOBAL IN, GLOBAL NOT IN, MOD, DIV, alias, AS, GROUP BY, WITH, HAVING, WINDOW, ORDER BY, LIMIT, OFFSET, FETCH, SETTINGS, UNION, EXCEPT, INTERSECT, INTO OUTFILE, FORMAT, end of query

And my config is like this.

freeze_by_part: true
freeze_by_part_where: "name LIKE concat('02a5d0453f5f69f16493f3074ef4b183','%') AND active=1"

The backup command is:
clickhouse-backup create solar_s3_0301_0751 --tables=solar.events

The clickhouse-backup version is 2.3.0

@and1990
Copy link
Author

and1990 commented Mar 1, 2024

Well, I found out how to solve this problem, add an "And", like this And name LIKE concat('02a5d0453f5f69f16493f3074ef4b183','%') AND active=1.

But I am confused, because I referred to the answer you offered in this issue #579, and you did not add the 'And'.

Did the code get modified or did you forget to add the "And" in the answer?

@Slach Slach self-assigned this Mar 1, 2024
@Slach Slach added this to the 2.5.0 milestone Mar 1, 2024
@Slach
Copy link
Collaborator

Slach commented Mar 1, 2024

thanks you for reporting
looks like i was wrong in referenced comment and AND is required now
will fix these behavior in 2.5.0

@Slach Slach mentioned this issue Mar 5, 2024
@Slach Slach closed this as completed in b37ca55 Apr 8, 2024
@Slach Slach closed this as completed in #843 Apr 8, 2024
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 a pull request may close this issue.

2 participants