ClickHouse / ClickHouse/dbt-clickhouse
Generic tests ought to support `final` keyword
- Dominant language
- Python
- Stars
- 362
- Forks
- 177
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 8
Description
**Is your feature request related to a problem? Please describe.**
Generic tests need to support the addition of `final` keyword for certain table engines.
If, for example, you have a `ReplacingMergeTree` you can insert updates to records, but they appear in queries as duplicates until a full merge has completed or the caller uses the `final` keyword to resolve duplicates to the latest record. Tests, for example a uniqueness test on a column, would necessarily fail.
**Describe the solution you'd like**
An option in the generic test configuration to apply the `final` keyword for tests, or perhaps the automatic use of the `final` keyword for certain engines. For large tables though the second option might impact performance, so not sure this would be the right way to go about this.
**Additional context**
This ticket is more about the issue that we have faced than a concrete suggestion of the solution. I wonder if this will kick off a discussion about how to implement this is a sensible way?
It is also quite possible that there is already some kind of solution to this issue that I am not aware of.
Contributor guide
Research direction
No files, tests, or entry points are named. Start by locating the generic test configuration and the handling of queries against ReplacingMergeTree tables, then review the existing test suite for engine-specific options. Done requires an agreed design for applying FINAL, coverage for the affected generic tests, and confirmation that performance concerns are addressed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- databases, testing
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100