Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The "show index" command does not display the inverted index. #5160

Open
killme2008 opened this issue Dec 13, 2024 · 0 comments
Open

The "show index" command does not display the inverted index. #5160

killme2008 opened this issue Dec 13, 2024 · 0 comments
Labels
C-bug Category Bugs good first issue Good for newcomers

Comments

@killme2008
Copy link
Contributor

What type of bug is this?

Incorrect result

What subsystems are affected?

Query Engine

Minimal reproduce step

Starting from v0.10, we can create a table with an inverted index constraint, as shown below:

CREATE TABLE IF NOT EXISTS system_metrics (
    host STRING,
    idc STRING,
    cpu_util DOUBLE,
    memory_util DOUBLE,
    disk_util DOUBLE,
    `load` DOUBLE,
    ts TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
    PRIMARY KEY(host, idc),
    INVERTED INDEX(idc),
    TIME INDEX(ts)
);

However, the command show index from system_metrics does not display the inverted index type:

mysql> show indexes from system_metrics;
+----------------+------------+------------+--------------+-------------+-----------+-------------+----------+--------+------+----------------------------+---------+---------------+---------+------------+
| Table          | Non_unique | Key_name   | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type                 | Comment | Index_comment | Visible | Expression |
+----------------+------------+------------+--------------+-------------+-----------+-------------+----------+--------+------+----------------------------+---------+---------------+---------+------------+
| system_metrics |          1 | PRIMARY    |            1 | host        | A         |        NULL |     NULL |   NULL | YES  | greptime-inverted-index-v1 |         |               | YES     |       NULL |
| system_metrics |          1 | PRIMARY    |            2 | idc         | A         |        NULL |     NULL |   NULL | YES  | greptime-inverted-index-v1 |         |               | YES     |       NULL |
| system_metrics |          1 | TIME INDEX |            1 | ts          | A         |        NULL |     NULL |   NULL | NO   | greptime-inverted-index-v1 |         |               | YES     |       NULL |
+----------------+------------+------------+--------------+-------------+-----------+-------------+----------+--------+------+----------------------------+---------+---------------+---------+------------+

It only shows the time index and primary key types.

What did you expect to see?

Output the idc as inverted index type too.

What did you see instead?

N/A

What operating system did you use?

All

What version of GreptimeDB did you use?

v0.10, v0.11

Relevant log output and stack trace

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category Bugs good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant