feat: add option for materialized types & improve filter performance for materialized Prefixes

This commit is contained in:
Marvin Gaube
2023-09-08 15:09:30 +02:00
committed by Vincent Bernat
parent 41932ca836
commit 5efa368e79
6 changed files with 82 additions and 15 deletions

View File

@@ -30,9 +30,15 @@ func New(config Configuration) (*Component, error) {
if column.ClickHouseAlias != "" {
column.ClickHouseGenerateFrom = column.ClickHouseAlias
column.ClickHouseAlias = ""
column.ClickHouseMaterialized = true
} else {
return nil, fmt.Errorf("no alias configured for %s that can be converted to generate", k)
}
// in case we have another data type for materialized columns, set it
if column.ClickHouseMaterializedType != "" {
column.ClickHouseType = column.ClickHouseMaterializedType
}
}
}
for _, k := range config.Enabled {