summaryrefslogtreecommitdiff
path: root/internal/mapr/query.go
diff options
context:
space:
mode:
authorPaul Buetow <pbuetow@mimecast.com>2020-03-07 16:55:49 +0000
committerPaul Buetow <pbuetow@mimecast.com>2020-03-07 16:55:49 +0000
commitfef20a8473a55858b6e753d420ec9232dbcb7671 (patch)
tree9a95ec19c04b087e84e9db37f4bc9b2b7f7a1d49 /internal/mapr/query.go
parent427e5c14454804c28bd6fa2205bb4121f52c1fbd (diff)
add support to run mapreduce queries on generic log lines, e.g. count all log lines containing a certain string, such as "ERROR"
Diffstat (limited to 'internal/mapr/query.go')
-rw-r--r--internal/mapr/query.go9
1 files changed, 6 insertions, 3 deletions
diff --git a/internal/mapr/query.go b/internal/mapr/query.go
index ec93e14..be766d1 100644
--- a/internal/mapr/query.go
+++ b/internal/mapr/query.go
@@ -148,9 +148,12 @@ func (q *Query) parse(tokens []token) error {
}
}
- if q.Table == "" {
- return errors.New(invalidQuery + "Empty table specified in 'from' clause")
- }
+ // Comment out for empty table support, which is "all" log lines.
+ /*
+ if q.Table == "" {
+ return errors.New(invalidQuery + "Empty table specified in 'from' clause")
+ }
+ */
if len(q.Select) < 1 {
return errors.New(invalidQuery + "Expected at least one field in 'select' clause but got none")
}