Skip to content

Commit 2d9e268

Browse files
docs: Add RESET Command Documentation (#21245)
## Which issue does this PR close? - Closes #21244. ## Rationale for this change `datafusion.catalog/execution/optimizer/explain/sql_parser/format.*` and `datafusion.runtime.*` configurations can be set by using `SET` Command. Also, they can be reset to their default value by using `RESET` Command. SET command has documentation but RESET does not have so this PR aims to add RESET Command documentation like SET Command. ## What changes are included in this PR? RESET Command Documentation is being added. ## Are these changes tested? Not required. ## Are there any user-facing changes? Yes
1 parent 6412c3a commit 2d9e268

2 files changed

Lines changed: 31 additions & 1 deletion

File tree

dev/update_config_docs.sh

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,24 @@ EOF
101101
echo "Running CLI and inserting config docs table"
102102
$PRINT_CONFIG_DOCS_COMMAND >> "$TARGET_FILE"
103103

104-
echo "Inserting runtime config header"
104+
echo "Inserting reset command details and runtime config header"
105105
cat <<'EOF' >> "$TARGET_FILE"
106106
107+
You can also reset configuration options to default settings via SQL using the `RESET` command. For
108+
example, to set and reset `datafusion.execution.batch_size`:
109+
110+
```sql
111+
SET datafusion.execution.batch_size = '10000';
112+
113+
SHOW datafusion.execution.batch_size;
114+
datafusion.execution.batch_size 10000
115+
116+
RESET datafusion.execution.batch_size;
117+
118+
SHOW datafusion.execution.batch_size;
119+
datafusion.execution.batch_size 8192
120+
```
121+
107122
# Runtime Configuration Settings
108123
109124
DataFusion runtime configurations can be set via SQL using the `SET` command.

docs/source/user-guide/configs.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,21 @@ The following configuration settings are available:
197197
| datafusion.format.duration_format | pretty | Duration format. Can be either `"pretty"` or `"ISO8601"` |
198198
| datafusion.format.types_info | false | Show types in visual representation batches |
199199

200+
You can also reset configuration options to default settings via SQL using the `RESET` command. For
201+
example, to set and reset `datafusion.execution.batch_size`:
202+
203+
```sql
204+
SET datafusion.execution.batch_size = '10000';
205+
206+
SHOW datafusion.execution.batch_size;
207+
datafusion.execution.batch_size 10000
208+
209+
RESET datafusion.execution.batch_size;
210+
211+
SHOW datafusion.execution.batch_size;
212+
datafusion.execution.batch_size 8192
213+
```
214+
200215
# Runtime Configuration Settings
201216

202217
DataFusion runtime configurations can be set via SQL using the `SET` command.

0 commit comments

Comments
 (0)