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

Update deprecated query in createVersionTableSQL for new ClickHouse versions since 22.7 #408

Merged
merged 3 commits into from
Oct 21, 2022

Conversation

Systemnick
Copy link
Contributor

Fixes #392

dialect.go Outdated
) Engine = MergeTree(date, (date), 8192)`, TableName())
)
ENGINE = MergeTree()
ORDER BY (version_id)`, TableName())
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why change the sorting key from date to version_id ?

The sorting keys are either autoincrementing id's or default date at the time of insert.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

@mfridman
Copy link
Collaborator

@Systemnick Can you also bump the ClickHouse version to the latest (22.9-alpine)? It's here:

CLICKHOUSE_VERSION = "22.6-alpine"

Thanks! This should fix those pesky errors:

unexpected error: code: 36, message: This syntax for *MergeTree engine is deprecated. Use extended storage definition syntax with ORDER BY/PRIMARY KEY clause.See also allow_deprecated_syntax_for_merge_tree setting.

@Systemnick
Copy link
Contributor Author

@mfridman, done!
However, tests had passed regardless of the specified version.

Also, I couldn't find setting allow_deprecated_syntax_for_merge_tree to true in tests, as described in issue.

@mfridman
Copy link
Collaborator

allow_deprecated_syntax_for_merge_tree

No worries, the older syntax didn't work with newer versions. But now it should be okay.

lgtm.

Copy link
Collaborator

@mfridman mfridman left a comment

Choose a reason for hiding this comment

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

Thanks for fixing this up!

@mfridman mfridman merged commit f30eb6d into pressly:master Oct 21, 2022
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.

Set allow_deprecated_syntax_for_merge_tree in ClickHouse tests
2 participants