mirror of https://github.com/grafana/loki
fix: use syntax.MustClone to avoid panics when cloning expressions (#11595)
The clone function in rangemapper has been a persistent source of panics due to the way stringifying exprs changed the way the original query was represented. This PR replaces the `clone` function with `syntax.MustClone`. It clones the expression by actually walking the AST rather than doing `expr -> string -> parse`. It might still panic but for a more fundamental reason than because of issues with the string representation.pull/9831/head^2
parent
efdea22db4
commit
3373cc54f6
File diff suppressed because one or more lines are too long
Loading…
Reference in new issue