Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Incorrect column in CSV format when select field is function #461

Closed
chloe-zh opened this issue May 7, 2020 · 0 comments
Closed

Incorrect column in CSV format when select field is function #461

chloe-zh opened this issue May 7, 2020 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@chloe-zh
Copy link
Member

chloe-zh commented May 7, 2020

Example:

Index: kibana_sample_data_flights

Query:

POST _opendistro/_sql?format=csv
{
    "query": "select log(AvgTicketPrice) from kibana_sample_data_flights limit 5"
}

Result:

log(AvgTicketPrice),FlightNum,Origin,OriginLocation,DestLocation,FlightDelay,DistanceMiles,FlightTimeMin,OriginWeather,dayOfWeek,AvgTicketPrice,Carrier,FlightDelayMin,OriginRegion,FlightDelayType,DestAirportID,timestamp,Dest,FlightTimeHour,Cancelled,DistanceKilometers,OriginCityName,DestWeather,OriginCountry,DestCountry,DestRegion,OriginAirportID,DestCityName
6.472336294873528,JHB3J5V,Melbourne International Airport,"{lon=144.843002, lat=-37.673302}","{lon=-93.22180176, lat=44.88199997}",false,9441.687300483349,1012.9948537939384,Heavy Fog,4,646.9935382543698,Kibana Airlines,0,SE-BD,No Delay,MSP,2020-04-03T01:03:05,Minneapolis-St Paul International/Wold-Chamberlain Airport,16.883247563232306,false,15194.922806909077,Melbourne,Clear,AU,US,US-MN,MEL,Minneapolis
6.839912084672193,GQTQ1B3,London Gatwick Airport,"{lon=-0.190277994, lat=51.14810181}","{lon=141.6920013, lat=42.77519989}",false,5571.180557608165,471.89189491070294,Heavy Fog,4,934.4069613948874,ES-Air,0,GB-ENG,No Delay,CTS,2020-04-03T14:03:40,New Chitose Airport,7.864864915178383,false,8965.946003303356,London,Cloudy,GB,JP,SE-BD,LGW,Chitose / Tomakomai
5.8188328302884935,80V65VD,Shanghai Hongqiao International Airport,"{lon=121.3359985, lat=31.19790077}","{lon=12.3519, lat=45.505299}",false,5536.339466666921,424.27974774493384,Clear,4,336.5789802442783,ES-Air,0,SE-BD,No Delay,VE05,2020-04-03T06:55:15,Venice Marco Polo Airport,7.071329129082231,false,8909.87470264361,Shanghai,Hail,CN,IT,IT-34,SHA,Venice
5.452020493148166,XF0OU6C,Naples International Airport,"{lon=14.2908, lat=40.886002}","{lon=10.8885, lat=45.395699}",false,355.5783118615778,52.022529338596286,Cloudy,4,233.2289208440965,Logstash Airways,0,IT-72,No Delay,VR10,2020-04-03T19:09:19,Verona Villafranca Airport,0.8670421556432715,true,572.2478227245591,Naples,Thunder & Lightning,IT,IT,IT-34,NA01,Verona
6.290595154646786,TA2TQ3Y,Narita International Airport,"{lon=140.3860016, lat=35.76470184}","{lon=7.64963, lat=45.200802}",false,6127.111396898864,657.3753309287204,Rain,4,539.4743076328305,Logstash Airways,0,SE-BD,No Delay,TO11,2020-04-03T04:21:10,Turin Airport,10.956255515478672,false,9860.629963930805,Tokyo,Heavy Fog,JP,IT,IT-21,NRT,Torino

Expected output:

log(AvgTicketPrice)
6.472336294873528
6.839912084672193
5.8188328302884935
5.452020493148166
6.290595154646786

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant