Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sometimes data only has a single value #15

Closed
domoritz opened this issue Dec 4, 2016 · 3 comments
Closed

Sometimes data only has a single value #15

domoritz opened this issue Dec 4, 2016 · 3 comments
Assignees
Labels

Comments

@domoritz
Copy link
Member

domoritz commented Dec 4, 2016

I simply try to use a second brush.

screen shot 2016-12-03 at 20 32 41

The server shows this error

QueryResultError {
    code: queryResultErrorCode.noData
    message: "No data returned from the query."
    received: 0
    query: {"name":"DEP_DELAY-9","text":"\n      SELECT width_bucket(\"DEP_DELAY\", $1, $2, $3) as bucket, count(*)\n      FROM flights\n      WHERE $4 < \"DEP_DELAY\" and \"DEP_DELAY\" < $5 and \"DISTANCE\" < $6 and $7 < \"ARR_DELAY\" and \"ARR_DELAY\" < $8\n      GROUP BY bucket order by bucket asc;\n    ","values":[0,100,25,0,100,1016.1363636363637,39.09090909090909,59.77272727272728]}
}

But the query seems to be correct and returns data if I run it in psql. Any ideas?

@domoritz
Copy link
Member Author

domoritz commented Dec 4, 2016

Could it be that there is some confusion with values (in value space) and indexes (in pixel space)?

@mathisonian
Copy link
Member

mathisonian commented Dec 6, 2016

A couple things -

I've fixed the bug where you get a distribution like in the screenshot, e.g.

{ 0: 10000, 1: 0, 2: 0 ... 25: 0 }

There is still a problem where if you have prepared statements enabled sometimes no rows are returned at all (I never get this unless prepared statements are turned on - is this the same for you @domoritz?). I've confirmed as well that the queries are being properly formatted and they do return data when run against postgres.

I asked the guy who wrote pg-promise and he confirmed that this definitely looks like an issue at the postgres level and not in the node.js layer, so at least (afaict) we've isolated it to the prepared statements in postgres

@domoritz
Copy link
Member Author

This is so old it probably isn't relevant any more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants