-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Labels
Description
The code to transform the query from the original query to a new query with the condition replaced is present at
| func NewQueryTransformer(sql string, vars []VariableValue) *QueryTransformer { |
It should be integrated with the
signoz/pkg/querier/clickhouse_query.go
Line 63 in 7c05160
func (q *chSQLQuery) renderVars(query string, vars map[string]qbtypes.VariableItem, start, end uint64) (string, error) { - variable on the
/api/v1/query
This is to be done in two steps
- Passthrough logic
- integrate with the transformer and check if the result query is the same as the incoming query for the existing queries; if not, log an error
- for the queries that use a dynamic variable, ensure the filter is removed
- Enable as the active substitution once all the cases of parsing and substitution are covered.