Skip to content

Add tests for CLEAR COLUMN IN PARTITION in SummingMergeTree#128

Open
CarlosFelipeOR wants to merge 1 commit intomainfrom
new_summing_merge_tree_test
Open

Add tests for CLEAR COLUMN IN PARTITION in SummingMergeTree#128
CarlosFelipeOR wants to merge 1 commit intomainfrom
new_summing_merge_tree_test

Conversation

@CarlosFelipeOR
Copy link
Copy Markdown
Collaborator

Summary

Test plan

  • zero_row_deletion_with_update — passes on all versions
  • zero_row_deletion_with_clear_column — xfail on >=25.8 (upstream issue)
  • clear_column_validation_consistency — xfail on all versions (upstream issue)

try:
with Given("I create SummingMergeTree table with partition key"):
node.query(
f"CREATE TABLE {name} (v UInt64, p UInt64, c UInt64)"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

It's best to reuse existing create table steps from helpers/create instead of creating a new query here - so the tests stay modular.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

You probably can reuse this:

def create_summing_merge_tree_table(

)

with When("I insert data"):
node.query(f"INSERT INTO {name} VALUES (1, 1, 100)")
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Same here - I would just crete a specific insert step either here or in steps.py and call that step here

node.query(f"INSERT INTO {name} VALUES (2, 2, 200)")

with And("I update summing column to zero"):
node.query(f"ALTER TABLE {name} UPDATE c = 0 WHERE v = 1")
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

We also have alter steps under helpers/alter

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

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.

2 participants