grafana/pkg/tsdb/influxdb/influxql/testdata
ismail simsek c088d003f2
InfluxDB: Implement InfluxQL json streaming parser (#76934)
* Have the first iteration

* Prepare bench testing

* rename the test files

* Remove unnecessary test file

* Introduce influxqlStreamingParser feature flag

* Apply streaming parser feature flag

* Add new tests

* More tests

* return executedQueryString only in first frame

* add frame meta and config

* Update golden json files

* Support tags/labels

* more tests

* more tests

* Don't change original response_parser.go

* provide context

* create util package

* don't pass the row

* update converter with formatted frameName

* add executedQueryString info only to first frame

* update golden files

* rename

* update test file

* use pointer values

* update testdata

* update parsing

* update converter for null values

* prepare converter for table response

* clean up

* return timeField in fields

* handle no time column responses

* better nil field handling

* refactor the code

* add table tests

* fix config for table

* table response format

* fix value

* if there is no time column set name

* linting

* refactoring

* handle the status code

* add tracing

* Update pkg/tsdb/influxdb/influxql/converter/converter_test.go

Co-authored-by: İnanç Gümüş <m@inanc.io>

* fix import

* update test data

* sanity

* sanity

* linting

* simplicity

* return empty rsp

* rename to prevent confusion

* nullableJson field type for null values

* better handling null values

* remove duplicate test file

* fix healthcheck

* use util for pointer

* move bench test to root

* provide fake feature manager

* add more tests

* partial fix for null values in table response format

* handle partial null fields

* comments for easy testing

* move frameName allocation in readSeries

* one less append operation

* performance improvement by making string conversion once

pkg: github.com/grafana/grafana/pkg/tsdb/influxdb/influxql
             │ stream2.txt │            stream3.txt             │
             │   sec/op    │   sec/op     vs base               │
ParseJson-10   314.4m ± 1%   303.9m ± 1%  -3.34% (p=0.000 n=10)

             │ stream2.txt  │             stream3.txt              │
             │     B/op     │     B/op      vs base                │
ParseJson-10   425.2Mi ± 0%   382.7Mi ± 0%  -10.00% (p=0.000 n=10)

             │ stream2.txt │            stream3.txt             │
             │  allocs/op  │  allocs/op   vs base               │
ParseJson-10   7.224M ± 0%   6.689M ± 0%  -7.41% (p=0.000 n=10)

* add comment lines

---------

Co-authored-by: İnanç Gümüş <m@inanc.io>
2023-12-06 12:39:05 +01:00
..
all_values_are_null.json Chore: InlfuxDB testing update (#78663) 2023-11-29 16:19:46 +01:00
all_values_are_null.table.golden.jsonc Chore: InlfuxDB testing update (#78663) 2023-11-29 16:19:46 +01:00
all_values_are_null.time_series.golden.jsonc Chore: InlfuxDB testing update (#78663) 2023-11-29 16:19:46 +01:00
empty_response.json Chore: InlfuxDB testing update (#78663) 2023-11-29 16:19:46 +01:00
empty_response.table.golden.jsonc Chore: InlfuxDB testing update (#78663) 2023-11-29 16:19:46 +01:00
empty_response.time_series.golden.jsonc Chore: InlfuxDB testing update (#78663) 2023-11-29 16:19:46 +01:00
error_on_top_level_response.json Chore: InlfuxDB testing update (#78663) 2023-11-29 16:19:46 +01:00
error_response.json Chore: InlfuxDB testing update (#78663) 2023-11-29 16:19:46 +01:00
influx_select_all_from_cpu.json InfluxDB: Implement InfluxQL json streaming parser (#76934) 2023-12-06 12:39:05 +01:00
influx_select_all_from_cpu.table.golden.jsonc InfluxDB: Implement InfluxQL json streaming parser (#76934) 2023-12-06 12:39:05 +01:00
influx_select_all_from_cpu.time_series.golden.jsonc InfluxDB: Implement InfluxQL json streaming parser (#76934) 2023-12-06 12:39:05 +01:00
invalid_timestamp_format.json Chore: InlfuxDB testing update (#78663) 2023-11-29 16:19:46 +01:00
invalid_value_format.json Chore: InlfuxDB testing update (#78663) 2023-11-29 16:19:46 +01:00
invalid_value_format.table.golden.jsonc Chore: InlfuxDB testing update (#78663) 2023-11-29 16:19:46 +01:00
invalid_value_format.time_series.golden.jsonc Chore: InlfuxDB testing update (#78663) 2023-11-29 16:19:46 +01:00
many_columns.json InfluxDB: Fix an edge case while parsing table response (#78802) 2023-12-01 18:31:49 +01:00
many_columns.table.golden.jsonc InfluxDB: Fix an edge case while parsing table response (#78802) 2023-12-01 18:31:49 +01:00
many_columns.time_series.golden.jsonc InfluxDB: Fix an edge case while parsing table response (#78802) 2023-12-01 18:31:49 +01:00
metric_find_queries.json Chore: InlfuxDB testing update (#78663) 2023-11-29 16:19:46 +01:00
metric_find_queries.table.golden.jsonc Chore: InlfuxDB testing update (#78663) 2023-11-29 16:19:46 +01:00
metric_find_queries.time_series.golden.jsonc Chore: Return executedString information even with frames has no time column (#78906) 2023-11-30 14:25:15 +01:00
multiple_measurements.json Chore: InlfuxDB testing update (#78663) 2023-11-29 16:19:46 +01:00
multiple_measurements.table.golden.jsonc Chore: InlfuxDB testing update (#78663) 2023-11-29 16:19:46 +01:00
multiple_measurements.time_series.golden.jsonc Chore: InlfuxDB testing update (#78663) 2023-11-29 16:19:46 +01:00
multiple_series_with_tags_and_multiple_columns.json Chore: InlfuxDB testing update (#78663) 2023-11-29 16:19:46 +01:00
multiple_series_with_tags_and_multiple_columns.table.golden.jsonc Chore: InlfuxDB testing update (#78663) 2023-11-29 16:19:46 +01:00
multiple_series_with_tags_and_multiple_columns.time_series.golden.jsonc Chore: InlfuxDB testing update (#78663) 2023-11-29 16:19:46 +01:00
multiple_series_with_tags.json Chore: InlfuxDB testing update (#78663) 2023-11-29 16:19:46 +01:00
multiple_series_with_tags.table.golden.jsonc Chore: InlfuxDB testing update (#78663) 2023-11-29 16:19:46 +01:00
multiple_series_with_tags.time_series.golden.jsonc Chore: InlfuxDB testing update (#78663) 2023-11-29 16:19:46 +01:00
one_measurement_with_two_columns.json Chore: InlfuxDB testing update (#78663) 2023-11-29 16:19:46 +01:00
one_measurement_with_two_columns.table.golden.jsonc Chore: InlfuxDB testing update (#78663) 2023-11-29 16:19:46 +01:00
one_measurement_with_two_columns.time_series.golden.jsonc Chore: InlfuxDB testing update (#78663) 2023-11-29 16:19:46 +01:00
response_with_nil_bools_and_nil_strings.json Chore: InlfuxDB testing update (#78663) 2023-11-29 16:19:46 +01:00
response_with_nil_bools_and_nil_strings.table.golden.jsonc Chore: InlfuxDB testing update (#78663) 2023-11-29 16:19:46 +01:00
response_with_nil_bools_and_nil_strings.time_series.golden.jsonc Chore: InlfuxDB testing update (#78663) 2023-11-29 16:19:46 +01:00
response_with_weird_tag.json Chore: InlfuxDB testing update (#78663) 2023-11-29 16:19:46 +01:00
response_with_weird_tag.table.golden.jsonc Chore: InlfuxDB testing update (#78663) 2023-11-29 16:19:46 +01:00
response_with_weird_tag.time_series.golden.jsonc Chore: InlfuxDB testing update (#78663) 2023-11-29 16:19:46 +01:00
response.json Chore: InlfuxDB testing update (#78663) 2023-11-29 16:19:46 +01:00
response.table.golden.jsonc Chore: InlfuxDB testing update (#78663) 2023-11-29 16:19:46 +01:00
response.time_series.golden.jsonc Chore: InlfuxDB testing update (#78663) 2023-11-29 16:19:46 +01:00
retention_policy.json Chore: InlfuxDB testing update (#78663) 2023-11-29 16:19:46 +01:00
retention_policy.table.golden.jsonc Chore: InlfuxDB testing update (#78663) 2023-11-29 16:19:46 +01:00
retention_policy.time_series.golden.jsonc Chore: Return executedString information even with frames has no time column (#78906) 2023-11-30 14:25:15 +01:00
show_tag_values_response.json Chore: InlfuxDB testing update (#78663) 2023-11-29 16:19:46 +01:00
show_tag_values_response.table.golden.jsonc Chore: InlfuxDB testing update (#78663) 2023-11-29 16:19:46 +01:00
show_tag_values_response.time_series.golden.jsonc Chore: Return executedString information even with frames has no time column (#78906) 2023-11-30 14:25:15 +01:00
simple_response_with_diverse_data_types.json Chore: InlfuxDB testing update (#78663) 2023-11-29 16:19:46 +01:00
simple_response_with_diverse_data_types.table.golden.jsonc Chore: InlfuxDB testing update (#78663) 2023-11-29 16:19:46 +01:00
simple_response_with_diverse_data_types.time_series.golden.jsonc Chore: InlfuxDB testing update (#78663) 2023-11-29 16:19:46 +01:00
simple_response.json Chore: InlfuxDB testing update (#78663) 2023-11-29 16:19:46 +01:00
simple_response.table.golden.jsonc Chore: InlfuxDB testing update (#78663) 2023-11-29 16:19:46 +01:00
simple_response.time_series.golden.jsonc Chore: InlfuxDB testing update (#78663) 2023-11-29 16:19:46 +01:00
some_values_are_null.json Chore: InlfuxDB testing update (#78663) 2023-11-29 16:19:46 +01:00
some_values_are_null.table.golden.jsonc Chore: InlfuxDB testing update (#78663) 2023-11-29 16:19:46 +01:00
some_values_are_null.time_series.golden.jsonc Chore: InlfuxDB testing update (#78663) 2023-11-29 16:19:46 +01:00
string_column_with_null_value2.json InfluxDB: Fix an edge case while parsing table response (#78802) 2023-12-01 18:31:49 +01:00
string_column_with_null_value2.table.golden.jsonc InfluxDB: Fix an edge case while parsing table response (#78802) 2023-12-01 18:31:49 +01:00
string_column_with_null_value2.time_series.golden.jsonc InfluxDB: Fix an edge case while parsing table response (#78802) 2023-12-01 18:31:49 +01:00
string_column_with_null_value.json InfluxDB: Fix an edge case while parsing table response (#78802) 2023-12-01 18:31:49 +01:00
string_column_with_null_value.table.golden.jsonc InfluxDB: Fix an edge case while parsing table response (#78802) 2023-12-01 18:31:49 +01:00
string_column_with_null_value.time_series.golden.jsonc InfluxDB: Fix an edge case while parsing table response (#78802) 2023-12-01 18:31:49 +01:00