Skip to content

Commit

Permalink
Allow writing non-numeric metric
Browse files Browse the repository at this point in the history
  • Loading branch information
momingkotoba committed May 19, 2023
1 parent 57bf7e7 commit be49fcf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# Changelog

#### Version 3.0.6 (TBD)
#### Version 3.0.6 (2023-05-19)

Improvements:

- When idenfying new columns, also update the schema of tables that are part of a logical cluster
- When idenfying new columns, also update the schema of tables that are part of a logical cluster
- Allow writing non-numeric type metric

#### Version 3.0.5 (2023-05-12)

Expand Down
5 changes: 1 addition & 4 deletions output/clickhouse.go
Original file line number Diff line number Diff line change
Expand Up @@ -283,9 +283,6 @@ func (c *ClickHouse) initSeriesSchema(conn clickhouse.Conn) (err error) {
if dim.Name == "__series_id" && dim.Type.Type == model.Int64 {
dimSerID = dim
c.Dims = append(c.Dims[:i], c.Dims[i+1:]...)
} else if dim.Type.Type == model.String {
c.Dims = append(c.Dims[:i], c.Dims[i+1:]...)
util.Logger.Warn("non-numeric type metric ignored", zap.String("metric name", dim.Name))
} else {
i++
}
Expand Down Expand Up @@ -441,7 +438,7 @@ func (c *ClickHouse) initSchema() (err error) {
}
}
if !withDistTable {
err = errors.Newf("Please create distributed table for %s in cluster '%s'.", c.seriesTbl, c.cfg.Clickhouse.Cluster)
err = errors.Newf("Please create distributed table for %s in cluster '%s'.", c.TableName, c.cfg.Clickhouse.Cluster)
return
}
}
Expand Down

0 comments on commit be49fcf

Please sign in to comment.