Skip to content

Instantly share code, notes, and snippets.

@yanatan16
Last active November 4, 2015 18:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yanatan16/9441daca0fa35dcc311f to your computer and use it in GitHub Desktop.
Save yanatan16/9441daca0fa35dcc311f to your computer and use it in GitHub Desktop.
quasar integer to float conversion bug

When querying inside the loc float array, pop becomes a float instead of an integer.

$ # SELECT pop, loc[0], loc[1] FROM zips LIMIT 10
$ curl 'http://localhost:8080/query/fs/local/quasar?q=SELECT%20pop%2C%20loc%5B0%5D%2C%20loc%5B1%5D%20FROM%20zips%20LIMIT%2010' -H'Accept: text/csv'

pop,1,2
15338.0,-72.622739,42.070206
36963.0,-72.51565,42.377017
4546.0,-72.108354,42.409698
10579.0,-72.410953,42.275103
1240.0,-72.936114,42.182949
3706.0,-72.188455,42.116543
1688.0,-72.988761,42.279421
177.0,-72.833309,42.38167
31495.0,-72.576142,42.176443
1764.0,-72.558657,42.196672

$ # SELECT pop, loc FROM zips LIMIT 10
$ curl 'http://localhost:8080/query/fs/local/quasar?q=SELECT%20pop%2C%20loc%20FROM%20zips%20LIMIT%2010' -H'Accept: text/csv'

loc[0],loc[1],pop
-72.108354,42.409698,4546
-72.622739,42.070206,15338
-72.936114,42.182949,1240
-72.410953,42.275103,10579
-72.51565,42.377017,36963
-72.188455,42.116543,3706
-72.988761,42.279421,1688
-72.833309,42.38167,177
-72.576142,42.176443,31495
-72.558657,42.196672,1764
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment