Tech Debt: "View Raw Data" mode shows incorrect column data types
- Dominant language
- TypeScript
- Stars
- 117
- Forks
- 51
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 4
Description
## About the bug
In cell edit/configure mode, you can switch from the plot to a raw data table view. This view shows all the data in a tab separated view but only one column header per page of data.
But the raw data typically has many tables and the _data types_ of the columns do not have to be the same among all the tables (`table` column is typically just an integer `0`, `1`, etc to designate the different series keys of the results).
In the ui, this raw data view is the only way to see the data types of the query response.
And if the data has mixed data types, the raw data view is wrong in the header column. Compare to downloading the annotated csv, which shows one column header row per table.
**Steps to reproduce:**
List the minimal actions needed to reproduce the behavior.
1. Load data with with similar series keys but two different datatypes. e.g.
```
weather,location=nyc temp=43.12
weather,location=miami temp=72i
```
2. query for the data in a cell (e.g. data explorer)
2. switch to edit the chart, and click "View Raw Data"
3. Note that the column header will show either "long" or "double" depending on which table/series key gets loaded first.
**Expected behavior:**
Raw data view correctly updates column headers when series keys change. The preview Raw Data modal did this correctly by repeating the column headers.
**Actual behavior:**
Raw Data shows incorrect data types.
**Visual Proof:**
Note that there are `6` different tables shown in this screenshot.


This one shows the same data just with a different sort and now the column is `double`

## About your environment
cloud2
**Environment info:**
**Config:**
NA
**Logs:**
NA
**Performance:**
NA
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.