influxdata / influxdata/influxdb
Query that combines measurements with same field name but different field types yields null values for field type String
- Dominant language
- Rust
- Stars
- 31.7k
- Forks
- 3.7k
- Avg merge
- 13h 37m
- Merged PRs (30d)
- 8
Description
__Steps to reproduce:__
1. produce two measurements with field "value", one field type Float, the other String
2. add points to both measurements
3. query for both measurements in the same query
__Expected behavior:__
Getting both series with "value" fields set.
__Actual behavior:__
The measurment with the String field type yields null values in the query.
**This does not occur, if the measurements are queries one by one**
__Environment info:__
* System info: docker
* InfluxDB version: v1.8.5
* Index Engine is tsm1
__Logs:__
Combined query (does not work)
```
> SELECT * FROM "sooTest.standalone.history.test.double","sooTest.standalone.history.test.string"
name: sooTest.standalone.history.test.double
time dataType status timeOfChange value
---- -------- ------ ------------ -----
1623927796953000000 7 0 1623927796953 905
name: sooTest.standalone.history.test.string
time dataType status timeOfChange value
---- -------- ------ ------------ -----
1623927751949000000 9 0 1623927751949
1623927793885000000 9 0 1623927793885
```
It also makes no difference if the measurement names are swapped in the query.
Single Query (works):
```
> SELECT * FROM "sooTest.standalone.history.test.string"
name: sooTest.standalone.history.test.string
time dataType status timeOfChange value
---- -------- ------ ------------ -----
1623927751949000000 9 0 1623927751949 AA
1623927793885000000 9 0 1623927793885 BB
```
Contributor guide
Research direction
Reproduce the combined SELECT over the Float and String measurements, then compare it with the single-measurement query shown in the report. Trace how the query handles the shared value field across differing field types; done when the combined query preserves the String values as the single query does.
Written by the indexing model from the issue text.
Assessment
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100