From 165ce036f48c3be3445feb77f7fbcc95994053e9 Mon Sep 17 00:00:00 2001 From: frenchzed Date: Fri, 28 Apr 2023 09:05:41 -0400 Subject: [PATCH] handle empty measurements --- ast.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ast.go b/ast.go index caa324f..6d661fb 100644 --- a/ast.go +++ b/ast.go @@ -3475,7 +3475,11 @@ func (m *Measurement) String() string { _, _ = buf.WriteString(m.Regex.String()) } - return buf.String() + if buf.Len() == 0 { + return QuoteIdent("") + } else { + return buf.String() + } } // SubQuery is a source with a SelectStatement as the backing store.