Skip to content

v3 Feature Request: make 'show tables' output alphabetical #25860

@danatinflux

Description

@danatinflux

(Note: sorry for not labeling this and whatnot---apparently I don't have the rights in this repo.)

Use case:
Currently, the 'show tables' output appears to be unsorted:

ubuntu@v3-astoria-rw:~$ influxdb3 query -d "test" "show tables"
+---------------+--------------------+----------------------------+------------+
| table_catalog | table_schema       | table_name                 | table_type |
+---------------+--------------------+----------------------------+------------+
| public        | iox                | influxdb_system            | BASE TABLE |
| public        | iox                | influxdb_build             | BASE TABLE |
| public        | iox                | influxdb_cmdline           | BASE TABLE |
| public        | iox                | influxdb_crypto            | BASE TABLE |
| public        | iox                | influxdb_memstats          | BASE TABLE |
| public        | iox                | influxdb_runtime           | BASE TABLE |
| public        | iox                | influxdb_queryExecutor     | BASE TABLE |
| public        | iox                | influxdb_database          | BASE TABLE |
| public        | iox                | influxdb_shard             | BASE TABLE |
| public        | iox                | influxdb_tsm1_engine       | BASE TABLE |
| public        | iox                | influxdb_tsm1_cache        | BASE TABLE |
| public        | iox                | influxdb_tsm1_filestore    | BASE TABLE |
| public        | iox                | influxdb_tsm1_wal          | BASE TABLE |
| public        | iox                | influxdb_localStore        | BASE TABLE |
| public        | iox                | influxdb_write             | BASE TABLE |
| public        | iox                | influxdb_hh                | BASE TABLE |
| public        | iox                | influxdb_hh_processor      | BASE TABLE |
| public        | iox                | influxdb_hh_node           | BASE TABLE |
| public        | iox                | influxdb_rpc               | BASE TABLE |
| public        | iox                | influxdb_entitlements      | BASE TABLE |
| public        | iox                | influxdb_cluster           | BASE TABLE |
| public        | iox                | influxdb_cq                | BASE TABLE |
| public        | iox                | influxdb_httpd             | BASE TABLE |
| public        | iox                | influxdb_ae                | BASE TABLE |
| public        | iox                | influxdb_subscriber        | BASE TABLE |
| public        | system             | compacted_data             | BASE TABLE |

It would be great if the tables were in alphabetical order.

Proposal:
It would be very helpful if the table name was sorted within the schema to which it belongs for readability and ease of use.

Current behaviour:
See above.

Desired behaviour:

ubuntu@v3-astoria-rw:~$ influxdb3 query -d "test" "show tables"
+---------------+--------------------+----------------------------+------------+
| table_catalog | table_schema       | table_name                 | table_type |
+---------------+--------------------+----------------------------+------------+
| public        | iox                | influxdb_ae                | BASE TABLE |
| public        | iox                | influxdb_build             | BASE TABLE |
| public        | iox                | influxdb_cluster           | BASE TABLE |
| public        | iox                | influxdb_cmdline           | BASE TABLE |
| public        | iox                | influxdb_cq                | BASE TABLE |
| public        | iox                | influxdb_crypto            | BASE TABLE |
| public        | iox                | influxdb_database          | BASE TABLE |
| public        | iox                | influxdb_entitlements      | BASE TABLE |
| public        | iox                | influxdb_hh                | BASE TABLE |
| public        | iox                | influxdb_hh_node           | BASE TABLE |
| public        | iox                | influxdb_hh_processor      | BASE TABLE |
| public        | iox                | influxdb_httpd             | BASE TABLE |
| public        | iox                | influxdb_localStore        | BASE TABLE |
| public        | iox                | influxdb_memstats          | BASE TABLE |
| public        | iox                | influxdb_queryExecutor     | BASE TABLE |
| public        | iox                | influxdb_rpc               | BASE TABLE |
| public        | iox                | influxdb_runtime           | BASE TABLE |
| public        | iox                | influxdb_shard             | BASE TABLE |
| public        | iox                | influxdb_subscriber        | BASE TABLE |
| public        | iox                | influxdb_system            | BASE TABLE |
| public        | iox                | influxdb_tsm1_cache        | BASE TABLE |
| public        | iox                | influxdb_tsm1_engine       | BASE TABLE |
| public        | iox                | influxdb_tsm1_filestore    | BASE TABLE |
| public        | iox                | influxdb_tsm1_wal          | BASE TABLE |
| public        | iox                | influxdb_write             | BASE TABLE |
| public        | system             | compacted_data             | BASE TABLE |

Alternatives considered:
The user could query the information_schema system table and order results from that, however, I feel that doesn't provide the best OOBE.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions