Skip to content

Commit

Permalink
fixing Error in overscope_eval_next(overscope, expr) : object 'statem…
Browse files Browse the repository at this point in the history
…ent_id' not found #32
  • Loading branch information
dleutnant committed Oct 17, 2017
1 parent 2628068 commit 36e9c98
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions R/influxdb_json_parser.R
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ query_list_to_tibble <- function(x, timestamp_format) {
if (!is.null(series_ele$statement_id)) {
# extract "statement_id"
statement_id <- series_ele$statement_id
} else {
# set NA to statement_id if not found
statement_id <- NA_integer_
}

if (!is.null(series_ele$series)) {
Expand Down Expand Up @@ -120,6 +123,7 @@ query_list_to_tibble <- function(x, timestamp_format) {
### in case of CHUNKED responses, concatenate tables with same statement_id
list_of_result <- list_of_result %>% # take the list of results
`if`(performance, timer(., "concatenate tables with same statement_id"), .) %>%
# This may cause trouble in with InfluxDB < V1.2, see issue #32
purrr::map("statement_id") %>% # extract "statement_id" of each result
purrr::map_int(unique) %>% # create a vector with unique "statement_id"
rle %>% # perform run length encoding to get the length of each "statement_id"
Expand Down

0 comments on commit 36e9c98

Please sign in to comment.