From [email protected] on July 31, 2012 13:16:31
What steps will reproduce the problem? If possible, provide a live demo of the issue. 1. There appears to be an issue parsing NaN from the response:
var query = 'SELECT * FROM 1_4R0hkTYJNFueoVRMxYNz0ajETQn6c8BLBxnnA LIMIT 10'
gapi.client.fusiontables.query.sql({sql:query}).execute(function(response) { console.log(response);});
It looks like there is a NaN in the response if a numeric column is left blank:
[
{
"result": {
"kind": "fusiontables#sqlresponse",
"columns": [
"Accident Num",
"County",
"Primary Street Name",
"Secondary Street Name",
"Crash Severity",
"Crash Year",
"Crash Day",
"Crash Hour Range",
"NM Non Motor Type",
"Injured Status",
"Injured Status Code",
"DOB",
"Age",
"NM Non Motor Action",
"Urban Rural",
"Alc Drug Susp",
"NM Factors",
"NM Loc Prior Impact",
"Non Motorist Rec Num",
"Accident Rec Num",
"lat",
"long",
"address"
],
"rows": [
[
"BCPD080693",
"CLARK",
"ALBERTSONS PARKING LOT",
"82 FEET NORTH OF SOUTH CURBLINE",
"Injury Accident",
"2000",
"SAT",
"12:00AM - 02:59AM",
"Pedestrian",
"Non-incapacitating",
"B",
"19-May-2008",
"3",
"Walking",
"U",
"Neither",
"",
"",
"12342",
"1774079",
"",
NaN, <--- When I change the value it works
""
]
...
},
"id": "gapiRpc"
}
] What is the expected output? What do you see instead? Expected output (from Chrome console):
Object
columns: Array[23]
kind: "fusiontables#sqlresponse"
result: Object
rows: Array[10]
proto: Object
Output:
Nothing (Blank)
I think it should at least throw an error. What version of the product are you using? On what operating system? Chrome Version 21.0.1180.57 beta (Linux)
Firefox 14.0.1 (Linux) Please provide any additional information below. Here is a table that will cause the client to silently fail: https://www.google.com/fusiontables/DataSource?docid=11bs75rfGCQJEKuoQu_N8A4l56lHPVHOYvxhoIek
Original issue: http://code.google.com/p/google-api-javascript-client/issues/detail?id=43