CartoDB / cartodb

Location Intelligence & Data Visualization tool
http://carto.com
BSD 3-Clause "New" or "Revised" License
2.74k stars 653 forks source link

Query hangs when it should just fail #391

Closed amandabee closed 9 years ago

amandabee commented 10 years ago

I ran this query from the table view for a different table (not 'us_states'):

SELECT the_geom, iso, 0 as damage FROM us_states WHERE the_geom IS NOT NULL

there's no 'iso' column in 'us_states'. I was actually looking for the error so I could show a student how to read the error and see what the problem is. I expected an error like column "iso" does not exist but instead I got "Loading Results ..." that hummed along until I got bored and went back to my dash. When I go back from the dash to the table again, I see that there's a problem with the query and the error is shown when I open the SQL pane.

If I run the query while I'm looking at the 'us_states' table, the error turns up fine. But if I run it from any other table, I have to go back to the dash and then re-enter the table view to see the error.

Low priority, but buggy nonetheless.

strk commented 10 years ago

You saw this in the "visualization" editor, I guess ? I tried to reproduce by going straight to a random table and modifying the query to select from another but in that case I got the error immediately visible.

strk commented 10 years ago

I could not reproduce from the visualization editor either. Please provide step-by-step instructions on how to reproduce it. Thank you.

amandabee commented 10 years ago

As I said, this happens to me in the table view.

I haven't tried variations on the query, but if I open any table and use this custom query (Table "us_states" exists but does not have an "iso" column. Table "us_states2" does not exist.)

SELECT the_geom, iso, 0 as damage FROM us_states WHERE the_geom IS NOT NULL 

or this one:

SELECT the_geom, iso, 0 as damage FROM us_states2 WHERE the_geom IS NOT NULL 

I see "loading results" indefinitely. If I exit the view by using the arrow in the upper left corner of the screen and then re enter the view from my dash, I see a pink dot over the "SQL" pane selector and the expected error (eg relation "us_states2" does not exist) is visible. Clear the view and the custom query functions as expected (immediately returns an error). Clear the view again, go back to the dash. Re-open the table. The query hangs.

untitled

strk commented 10 years ago

Is this happening on cartodb.com or a custom install ? When I try it on cartodb.com I get a 400 response to the POST request sent by the browser to the sql-api, and the message is immediately shown

amandabee commented 10 years ago

Cartodb.com

strk commented 10 years ago

What browser are you using, and what's your cartodb username ? I'm willing to try at reproducing this.

Can you reproduce it with any browser ? Also with no cache/cookies/auth_session ? (ie: with a "private window")

amandabee commented 10 years ago

I'm "cunydata" -- and I'm using Firefox 28 on Ubuntu 13.10, but I'll be on campus later this week and can try it on a mac. FWIW, it happened again:

 SELECT nycd.the_geom, nycd.iso_code,COUNT(*) as count 
 FROM nycd,  schools
 WHERE ST_Intersects(nycd.the_geom, schools.the_geom)
 GROUP BY nycd.the_geom, nycd.iso_code

I'm still finding my way around in PostGIS, so I was starting with these instructions: http://developers.cartodb.com/tutorials/joining_data.html#join_geospatial

And hadn't quite digested that my nycd table has no "iso_code" column. I wanted "borocd" (in my defense, CartoDB does have some cryptically named hidden columsn) but instead of saying "column does not exist" it just spun until I went back to the dash. When I reopened the table, the error was there.

amandabee commented 10 years ago

Confirming the same behavior on OSX 10.8.5 in both Firefox 21 and Chrome Version 27.0.1453.116

saleiva commented 9 years ago

I could not replicate. Closing.

Thanks!