-
Notifications
You must be signed in to change notification settings - Fork 629
Open
Labels
Description
Problem
- Currently in clickhouse-go all the column types are generated via this template based code. Which uses reflection heavily. And we lose type-safety-ness.
- Because of (1), we also lots of public api's that are not type-safe (accepts
anyas arguments).
Proposal
Can we solve these two problems by using Go's generics?
Goal
- How much effort needed to move from reflection based column types to re-usable generics based column types? (without template based code generation).
Measure: Lesser the reflection, more type-safe compile time checked code. Readability and Re-usability without code generation.
- What kind of performance gain we get at runtime for any kind of column operations like
ScanandScanRowsoperations.
Measure: Can we prove by some benchmarks?
- This will break some public api's related to columns scan. But is it worth the effort? Can we think any way to support this without breaking changes?
Measure: All tests passes in main branch without changing the old tests code.
This is more of a research/prototype problem. So expect multiple iterations and multiple unknowns. This issue is there to discuss and record our experiments.