Skip to content
This repository has been archived by the owner on Feb 21, 2024. It is now read-only.

Bug: TopN #120

Closed
tgruben opened this issue Oct 6, 2016 · 0 comments
Closed

Bug: TopN #120

tgruben opened this issue Oct 6, 2016 · 0 comments

Comments

@tgruben
Copy link
Member

tgruben commented Oct 6, 2016

Found a little snag @benbjohnson Let me know what you think

https://s3.amazonaws.com/tgruben.umbel.com/problem.csv.gz

Looks like an issue with scatter part of TopN.

$ curl -XPOST "http://pilosa2-test1:15000/query?db=13" -d'TopN(Intersect(Bitmap(id=0,frame=s.n),Bitmap(id=1,frame=s.n)),frame=s.n,n=2)' | python -m json.tool
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   176  100   100  100    76    326    247 --:--:-- --:--:-- --:--:--   325
{
    "results": [
        [
            {
                "count": 82024,
                "key": 1
            },
            {
                "count": 1,
                "key": 2
            }
        ]
    ]
}
$ curl -XPOST "http://pilosa2-test1:15000/query?db=13" -d'TopN(Bitmap(id=0,frame=s.n),frame=s.n,n=2)' | python -m json.tool
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   104    0    62    0    42      0      0 --:--:--  0:01:39 --:--:--     5
{
    "results": [
        [
            {
                "count": 1999998,
                "key": 1
            },
            {
                "count": 1,
                "key": 2
            }
        ]
    ]
}

FYI, this is correct both ^ and v. Just fyi bitmap 0 is all prime numbers less than 32 million ish

$ curl -XPOST "http://pilosa2-test1:15000/query?db=13" -d'Count(Intersect(Bitmap(id=0,frame=s.n),Bitmap(id=0,frame=s.n)))' | python -m json.tool
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100    85  100    22  100    63    142    408 --:--:-- --:--:-- --:--:--   409
{
    "results": [
        2000000
    ]
}
tgruben pushed a commit to tgruben/pilosa that referenced this issue Sep 4, 2019
…ator

Refactored fetching coordinator for queries which involve keys
seebs pushed a commit to seebs/pilosa that referenced this issue Nov 19, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant