From eaf4a52ca7a71782accb6bd238613919bdd01d5c Mon Sep 17 00:00:00 2001 From: sheajamba Date: Thu, 29 Feb 2024 13:34:13 -0500 Subject: [PATCH] Clarify docs for ALTER TABLE EXECUTE --- docs/src/main/sphinx/sql/alter-table.md | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/docs/src/main/sphinx/sql/alter-table.md b/docs/src/main/sphinx/sql/alter-table.md index ad76bdd87c61..ed28fcf69106 100644 --- a/docs/src/main/sphinx/sql/alter-table.md +++ b/docs/src/main/sphinx/sql/alter-table.md @@ -54,13 +54,18 @@ per-connector basis. You can use the `=>` operator for passing named parameter values. The left side is the name of the parameter, the right side is the value being passed. -Collapse files in a table that are over 128 megabytes in size with the `optimize` -procedure from the [Hive](hive-alter-table-execute), [Delta -Lake](delta-lake-alter-table-execute) , and -[Iceberg](iceberg-alter-table-execute) connectors: - -``` -ALTER TABLE hive.schema.test_table EXECUTE optimize(file_size_threshold => '128MB') +Executable commands are contributed by connectors, such as the `optimize` +command provided by the [Hive](hive-alter-table-execute), [Delta +Lake](delta-lake-alter-table-execute), and +[Iceberg](iceberg-alter-table-execute) connectors. For example, a user observing +many small files in the storage of a table called `test_table` in the `test` +schema of the `example` catalog, can use the `optimize` command to merge all +files below the `file_size_threshold` value. The result is fewer, but larger +files, which typically results in higher query performance on the data in the +files: + +``` +ALTER TABLE example.test.test_table EXECUTE optimize(file_size_threshold => '16MB') ``` ## Examples