AgentSkillsCN

export-part

在 S3 测试套件中运行 export_part 测试。当用户希望运行 export part 测试、测试 ALTER TABLE EXPORT PART 功能,或测试将 MergeTree 分区导出至 S3 时,请使用此选项。

SKILL.md
--- frontmatter
name: export-part
description: Run export_part tests in the s3 test suite. Use when the user wants to run export part tests, test ALTER TABLE EXPORT PART functionality, or test exporting MergeTree parts to S3.

Export Part Test Suite

Run tests for the ALTER TABLE ... EXPORT PART feature, which exports MergeTree parts from local tables to S3 storage.

Working Directory

All commands must be run from the s3 directory:

code
cd clickhouse-regression/s3

Command Format

bash
./regression.py --storage minio --clickhouse <URL> --only "<test-path>"

Required Options

  • --clickhouse <URL> - URL to ClickHouse package (user must provide)
  • --storage minio - Storage backend to use
  • --only "<test-path>" - Test path pattern (must end with * to run all subtests)

Optional Options

  • -l test.log - Save test logs to a file

Test Path Structure

code
/s3/minio/export tests/export part/<feature>/*

The * wildcard is required to run all scenarios under a feature.

Available Features

FeatureDescription
sanityBasic functionality (settings, empty tables, wide/compact parts)
error handlingInvalid parts, disabled settings, corruption, pending mutations
datatypesPartition key types (Int, UInt, Date, DateTime, String, etc.)
columnsALIAS, MATERIALIZED, EPHEMERAL, DEFAULT, JSON, nested columns
clusters nodesMulti-node exports to same S3 destination
shardsDistributed/sharded tables with Distributed engine
engines volumesDifferent table engines and volume configurations
networkPacket delay, loss, corruption, MinIO/ClickHouse interruptions
system monitoringEvents, part log, duplicate policies, metrics, bandwidth
concurrent alterALTER operations before/during/after exports
concurrent otherINSERT, SELECT, OPTIMIZE, KILL, DELETE during exports
pending mutations and patch partsAllowing exports with pending mutations
rbacALTER INSERT privilege requirements
table functionsTable function exports (explicit/inherited schema)

Examples

Run all column tests:

bash
./regression.py --storage minio --clickhouse https://example.com/clickhouse.deb --only "/s3/minio/export tests/export part/columns/*"

Run all sanity tests with logging:

bash
./regression.py --storage minio --clickhouse https://example.com/clickhouse.deb --only "/s3/minio/export tests/export part/sanity/*" -l test.log

Run all export part tests:

bash
./regression.py --storage minio --clickhouse https://example.com/clickhouse.deb --only "/s3/minio/export tests/export part/*"

Run a specific scenario (e.g., alias_columns under columns):

bash
./regression.py --storage minio --clickhouse https://example.com/clickhouse.deb --only "/s3/minio/export tests/export part/columns/alias columns"