influxdata / influxdata/influxdb

SELECT FROM multiple measurements returns values from only one measurement

Open
#20,785 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
31.7k
Forks
3.7k
Avg merge
13h 37m
Merged PRs (30d)
8

Description

## Steps to reproduce

Open CLI and type commands as shown:
```
Connected to http://localhost:8086 version 1.8.4
InfluxDB shell version: 1.8.4
> create database "sample"
> use sample
Using database sample
> insert channels,topic="foo" value=3.432
> insert boolean,topic="bar" value=true
> SELECT * FROM channels,boolean
name: channels
time topic value
---- ----- -----
1613754223159795400 "foo" 3.432
> SELECT * FROM boolean,channels
name: channels
time topic value
---- ----- -----
1613754223159795400 "foo" 3.432
> SELECT * FROM channels
name: channels
time topic value
---- ----- -----
1613754223159795400 "foo" 3.432
> SELECT * FROM boolean
name: boolean
time topic value
---- ----- -----
1613754242210800700 "bar" true
>
```

## Expected Behaviour

The first two `SELECT` statement - `SELECT * FROM channels,boolean` and `SELECT * FROM boolean,channels` - should result in both measurements - `channels` and `boolean` being shown.

## Actual Behaviour

Only the value from measurement `channels` is shown in each case.

## Environment Info

* System info: Linux 5.4.72-microsoft-standard-WSL2 x86_64
* InfluxDB version: InfluxDB v1.8.4 (git: 1.8 bc8ec4384eed25436d31045f974bf39f3310fa3c)
* Other relevant environment details: CLI run (and environment info above) from docker container (influxdb:1.8.4) invoked with the following environment variables set:
- INFLUXDB_DATA_ENGINE=tsm1
- INFLUXDB_REPORTING_DISABLED=true
- INFLUXDB_HTTP_LOG_ENABLED=true

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue in the CLI using the commands and two measurement orders shown in the report. Trace the query handling for multiple measurements; done means both SELECT statements return rows for channels and boolean rather than only channels.

Written by the indexing model from the issue text.

Assessment

Domain
cli, databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.