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

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

Open
danatinflux opened this issue Jan 17, 2025 · 0 comments
Open

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

danatinflux opened this issue Jan 17, 2025 · 0 comments
Labels

Comments

@danatinflux
Copy link

(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.

@hiltontj hiltontj added the v3 label Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants