diff options
| author | Paul Buetow <paul@buetow.org> | 2021-09-12 19:01:34 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2021-10-02 12:26:29 +0300 |
| commit | 842fd5800000bb68d6306a9ecad80a98ed762a2f (patch) | |
| tree | 593e6c606f5eb3f8ef2634ab9ca7c267165ccdc8 /internal/mapr/globalgroupset.go | |
| parent | 16dc57e1e1c28e9d762424e596223a980770e059 (diff) | |
limit mapreduce table output to 10 rows by default
Diffstat (limited to 'internal/mapr/globalgroupset.go')
| -rw-r--r-- | internal/mapr/globalgroupset.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/mapr/globalgroupset.go b/internal/mapr/globalgroupset.go index 21bf990..50bac37 100644 --- a/internal/mapr/globalgroupset.go +++ b/internal/mapr/globalgroupset.go @@ -93,9 +93,9 @@ func (g *GlobalGroupSet) WriteResult(query *Query) error { } // Result returns the result of the mapreduce aggregation as a string. -func (g *GlobalGroupSet) Result(query *Query) (string, int, error) { +func (g *GlobalGroupSet) Result(query *Query, rowsLimit int) (string, int, error) { g.semaphore <- struct{}{} defer func() { <-g.semaphore }() - return g.GroupSet.Result(query) + return g.GroupSet.Result(query, rowsLimit) } |
