Skip to content

Commit b9e521f

Browse files
authored
clarify ShowTagValuesStatement comments (#44)
The conventions followed by the struct values weren't entirely clear without reading the parser and the specification. This change should hopefully help in that respect.
1 parent b6ab994 commit b9e521f

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

ast.go

+13-2
Original file line numberDiff line numberDiff line change
@@ -2989,15 +2989,26 @@ type ShowTagValuesStatement struct {
29892989
Sources Sources
29902990

29912991
// Operation to use when selecting tag key(s).
2992+
// This is one of: (associated TagKeyExpr Literal
2993+
// type in parentheses:
2994+
// EQ (*StringLiteral)
2995+
// NEQ (*StringLiteral)
2996+
// IN (*ListLiteral)
2997+
// EQREGEX (*RegexLiteral)
2998+
// NEQREGEX (*RegexLiteral)
29922999
Op Token
29933000

29943001
// Literal to compare the tag key(s) with.
3002+
// The value of the above Op field determines its dynamic type.
29953003
TagKeyExpr Literal
29963004

2997-
// An expression evaluated on data point.
3005+
// An expression evaluated on each data point.
29983006
Condition Expr
29993007

3000-
// Fields to sort results by.
3008+
// NOTE: The specfication doesn't permit ORDER BY in
3009+
// a SHOW TAG VALUES statement and this field is
3010+
// ignored in practice. It's only left here to maintain
3011+
// backward compatibility.
30013012
SortFields SortFields
30023013

30033014
// Maximum number of rows to be returned.

0 commit comments

Comments
 (0)