Skip to content

Fix the SQL docs for SHOW TABLES have misaligned examples #115285

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions x-pack/plugin/sql/qa/server/src/main/resources/alias.csv-spec
Original file line number Diff line number Diff line change
Expand Up @@ -92,15 +92,15 @@ wildcard_name |VARCHAR |keyword
showAlias
SHOW TABLES LIKE 'test\_alias' ESCAPE '\';

catalog:s |name:s | type:s | kind:s
catalog:s |name:s | type:s | kind:s

javaRestTest |test_alias | VIEW | ALIAS
;

showPattern
SHOW TABLES LIKE 'test_%';

catalog:s |name:s | type:s | kind :s
catalog:s |name:s | type:s | kind :s

javaRestTest |test_alias | VIEW | ALIAS
javaRestTest |test_alias_emp | VIEW | ALIAS
Expand Down
16 changes: 8 additions & 8 deletions x-pack/plugin/sql/qa/server/src/main/resources/command.csv-spec
Original file line number Diff line number Diff line change
Expand Up @@ -226,13 +226,13 @@ SHOW CATALOGS;

name | type
---------------+---------------
javaRestTest |local
javaRestTest |local
;

showTables
SHOW TABLES;

catalog | name | type | kind
catalog | name | type | kind
javaRestTest |apps |TABLE |INDEX
javaRestTest |empty_mapping |TABLE |INDEX
javaRestTest |logs |TABLE |INDEX
Expand All @@ -247,44 +247,44 @@ javaRestTest |test_emp_copy |TABLE |INDEX
showTablesSimpleLike
SHOW TABLES LIKE 'test_emp';

catalog:s | name:s | type:s| kind:s
catalog:s | name:s | type:s| kind:s
javaRestTest |test_emp |TABLE |INDEX
;

showTablesMultiLike
SHOW TABLES LIKE 'test_emp%';

catalog:s | name:s |type:s |kind:s
catalog:s | name:s |type:s |kind:s
javaRestTest |test_emp |TABLE |INDEX
javaRestTest |test_emp_copy |TABLE |INDEX
;

showTablesIdentifier
SHOW TABLES "test_emp";

catalog:s | name:s |type:s |kind:s
catalog:s | name:s |type:s |kind:s
javaRestTest |test_emp |TABLE |INDEX
;

showTablesIdentifierPattern
SHOW TABLES "test_e*,-test_emp";

catalog:s | name:s |type:s |kind:s
catalog:s | name:s |type:s |kind:s
javaRestTest |test_emp_copy |TABLE |INDEX
;

showTablesIdentifierPatternOnAliases
SHOW TABLES "test*,-test_emp*";

catalog:s | name:s | type:s | kind:s
catalog:s | name:s | type:s | kind:s
javaRestTest |test_alias |VIEW |ALIAS
javaRestTest |test_alias_emp |VIEW |ALIAS
;

showTablesLocalCatalog
SHOW TABLES CATALOG 'javaRestTest';

catalog | name | type | kind
catalog | name | type | kind
javaRestTest |apps |TABLE |INDEX
javaRestTest |empty_mapping |TABLE |INDEX
javaRestTest |logs |TABLE |INDEX
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ SHOW TABLES INCLUDE FROZEN;

catalog | name | type | kind
---------------+---------------+----------+---------------
javaRestTest |archive |TABLE |FROZEN INDEX
javaRestTest |emp |TABLE |INDEX
javaRestTest |employees |VIEW |ALIAS
javaRestTest |library |TABLE |INDEX
javaRestTest |archive |TABLE |FROZEN INDEX
javaRestTest |emp |TABLE |INDEX
javaRestTest |employees |VIEW |ALIAS
javaRestTest |library |TABLE |INDEX

// end::showTablesIncludeFrozen
;
Expand Down
20 changes: 10 additions & 10 deletions x-pack/plugin/sql/qa/server/src/main/resources/docs/docs.csv-spec
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,9 @@ SHOW TABLES;

catalog | name | type | kind
---------------+---------------+----------+---------------
javaRestTest |emp |TABLE |INDEX
javaRestTest |employees |VIEW |ALIAS
javaRestTest |library |TABLE |INDEX
javaRestTest |emp |TABLE |INDEX
javaRestTest |employees |VIEW |ALIAS
javaRestTest |library |TABLE |INDEX

// end::showTables
;
Expand All @@ -112,7 +112,7 @@ SHOW TABLES LIKE 'emp';

catalog | name | type | kind
---------------+---------------+----------+---------------
javaRestTest |emp |TABLE |INDEX
javaRestTest |emp |TABLE |INDEX

// end::showTablesLikeExact
;
Expand All @@ -123,8 +123,8 @@ SHOW TABLES LIKE 'emp%';

catalog | name | type | kind
---------------+---------------+----------+---------------
javaRestTest |emp |TABLE |INDEX
javaRestTest |employees |VIEW |ALIAS
javaRestTest |emp |TABLE |INDEX
javaRestTest |employees |VIEW |ALIAS

// end::showTablesLikeWildcard
;
Expand All @@ -136,7 +136,7 @@ SHOW TABLES LIKE 'em_';

catalog | name | type | kind
---------------+---------------+----------+---------------
javaRestTest |emp |TABLE |INDEX
javaRestTest |emp |TABLE |INDEX

// end::showTablesLikeOneChar
;
Expand All @@ -147,7 +147,7 @@ SHOW TABLES LIKE '%em_';

catalog | name | type | kind
---------------+---------------+----------+---------------
javaRestTest |emp |TABLE |INDEX
javaRestTest |emp |TABLE |INDEX

// end::showTablesLikeMixed
;
Expand All @@ -170,8 +170,8 @@ SHOW TABLES "*,-l*";

catalog | name | type | kind
---------------+---------------+----------+---------------
javaRestTest |emp |TABLE |INDEX
javaRestTest |employees |VIEW |ALIAS
javaRestTest |emp |TABLE |INDEX
javaRestTest |employees |VIEW |ALIAS

// end::showTablesEsMultiIndex
;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
showTables
SHOW TABLES "geo";

catalog:s | name:s | type:s| kind:s
catalog:s | name:s | type:s| kind:s
javaRestTest |geo |TABLE |INDEX
;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ SYS TABLES CATALOG LIKE '%' LIKE '';

TABLE_CAT:s | TABLE_SCHEM:s| TABLE_NAME:s | TABLE_TYPE:s | REMARKS:s | TYPE_CAT:s | TYPE_SCHEM:S | TYPE_NAME:s |SELF_REFERENCING_COL_NAME:s|REF_GENERATION:s
-----------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+-------------------------+---------------
javaRestTest |null |null |null |null |null |null |null |null |null
javaRestTest |null |null |null |null |null |null |null |null |null
my_remote_cluster|null |null |null |null |null |null |null |null |null
;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ SHOW CATALOGS;

name | type
------------------+---------------
javaRestTest |local
javaRestTest |local
my_remote_cluster |remote

// end::showCatalogs
Expand Down
Loading