influxdata / influxdb-client-js

InfluxDB 2.0 JavaScript client
https://influxdata.github.io/influxdb-client-js/
MIT License
327 stars 70 forks source link

quoted string values are not handled properly #179

Closed alespour closed 4 years ago

alespour commented 4 years ago

Client does not seem to ignore commas in quoted string values and interprets them as column separators. In the example bellow, in JS code, header length is 7 and data row length 8, and the value for item with index 5 is "-73.68691 40.820317. Also, quote chars are not part of the value.


#group,false,false,true,false,false,true
#datatype,string,long,string,double,string,string
#default,_result,,,,,
,result,table,id,st_length,st_linestring,trip_id
,,0,GO506_20_6431,25.463641400535032,"-73.68691 40.820317, -73.690054 40.815413",GO506_20_6431
sranka commented 4 years ago

Thank you @alespour , I tested your data with 3 new tests in 1c081d8

https://github.com/influxdata/influxdb-client-js/blob/1c081d8dd17227e737f96c24f347bf4194158839/packages/core/test/unit/QueryApi.test.ts#L149-L156

The root cause is likely not CSV processing.

alespour commented 4 years ago

Bug in my app, sorry.