Skip to content

Dynamic variable ALL doesn't work with ClickHouse queries #9889

@srikanthccv

Description

@srikanthccv

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

  1. func (q *chSQLQuery) renderVars(query string, vars map[string]qbtypes.VariableItem, start, end uint64) (string, error) {
  2. variable on the /api/v1/query

This is to be done in two steps

  1. 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
  2. Enable as the active substitution once all the cases of parsing and substitution are covered.

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions