Merge pull request #7561 from influxdata/js-7552-backport
Support the ON syntax in SHOW TAG VALUESpull/7570/head
commit
e4e5edcbea
|
@ -857,11 +857,11 @@ func (e *StatementExecutor) executeShowSubscriptionsStatement(stmt *influxql.Sho
|
|||
}
|
||||
|
||||
func (e *StatementExecutor) executeShowTagValues(q *influxql.ShowTagValuesStatement, ctx *influxql.ExecutionContext) error {
|
||||
if ctx.Database == "" {
|
||||
if q.Database == "" {
|
||||
return ErrDatabaseNameRequired
|
||||
}
|
||||
|
||||
tagValues, err := e.TSDBStore.TagValues(ctx.Database, q.Condition)
|
||||
tagValues, err := e.TSDBStore.TagValues(q.Database, q.Condition)
|
||||
if err != nil {
|
||||
ctx.Results <- &influxql.Result{
|
||||
StatementID: ctx.StatementID,
|
||||
|
@ -1089,6 +1089,10 @@ func (e *StatementExecutor) NormalizeStatement(stmt influxql.Statement, defaultD
|
|||
if node.Database == "" {
|
||||
node.Database = defaultDatabase
|
||||
}
|
||||
case *influxql.ShowTagValuesStatement:
|
||||
if node.Database == "" {
|
||||
node.Database = defaultDatabase
|
||||
}
|
||||
case *influxql.Measurement:
|
||||
switch stmt.(type) {
|
||||
case *influxql.DropSeriesStatement, *influxql.DeleteSeriesStatement:
|
||||
|
|
|
@ -122,6 +122,7 @@ func rewriteShowTagValuesStatement(stmt *ShowTagValuesStatement) (Statement, err
|
|||
condition = rewriteSourcesCondition(stmt.Sources, condition)
|
||||
|
||||
return &ShowTagValuesStatement{
|
||||
Database: stmt.Database,
|
||||
Op: stmt.Op,
|
||||
TagKeyExpr: stmt.TagKeyExpr,
|
||||
Condition: condition,
|
||||
|
|
Loading…
Reference in New Issue