Skip to content

Commit c7dbfeb

Browse files
authored
Minor: Improve documentation for catalog.has_header config option (#10452)
* Minor: document catalog.has_header better * update docs * update test
1 parent 3491f6b commit c7dbfeb

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

datafusion/common/src/config.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,8 @@ config_namespace! {
181181
/// Type of `TableProvider` to use when loading `default` schema
182182
pub format: Option<String>, default = None
183183

184-
/// If the file has a header
184+
/// Default value for `format.has_header` for `CREATE EXTERNAL TABLE`
185+
/// if not specified explicitly in the statement.
185186
pub has_header: bool, default = false
186187
}
187188
}

datafusion/sqllogictest/test_files/information_schema.slt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ datafusion.catalog.create_default_catalog_and_schema true Whether the default ca
246246
datafusion.catalog.default_catalog datafusion The default catalog name - this impacts what SQL queries use if not specified
247247
datafusion.catalog.default_schema public The default schema name - this impacts what SQL queries use if not specified
248248
datafusion.catalog.format NULL Type of `TableProvider` to use when loading `default` schema
249-
datafusion.catalog.has_header false If the file has a header
249+
datafusion.catalog.has_header false Default value for `format.has_header` for `CREATE EXTERNAL TABLE` if not specified explicitly in the statement.
250250
datafusion.catalog.information_schema true Should DataFusion provide access to `information_schema` virtual tables for displaying schema information
251251
datafusion.catalog.location NULL Location scanned to load tables for `default` schema
252252
datafusion.execution.aggregate.scalar_update_factor 10 Specifies the threshold for using `ScalarValue`s to update accumulators during high-cardinality aggregations for each input batch. The aggregation is considered high-cardinality if the number of affected groups is greater than or equal to `batch_size / scalar_update_factor`. In such cases, `ScalarValue`s are utilized for updating accumulators, rather than the default batch-slice approach. This can lead to performance improvements. By adjusting the `scalar_update_factor`, you can balance the trade-off between more efficient accumulator updates and the number of groups affected.

docs/source/user-guide/configs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ Environment variables are read during `SessionConfig` initialisation so they mus
4343
| datafusion.catalog.information_schema | false | Should DataFusion provide access to `information_schema` virtual tables for displaying schema information |
4444
| datafusion.catalog.location | NULL | Location scanned to load tables for `default` schema |
4545
| datafusion.catalog.format | NULL | Type of `TableProvider` to use when loading `default` schema |
46-
| datafusion.catalog.has_header | false | If the file has a header |
46+
| datafusion.catalog.has_header | false | Default value for `format.has_header` for `CREATE EXTERNAL TABLE` if not specified explicitly in the statement. |
4747
| datafusion.execution.batch_size | 8192 | Default batch size while creating new batches, it's especially useful for buffer-in-memory batches since creating tiny batches would result in too much metadata memory consumption |
4848
| datafusion.execution.coalesce_batches | true | When set to true, record batches will be examined between each operator and small batches will be coalesced into larger batches. This is helpful when there are highly selective filters or joins that could produce tiny output batches. The target batch size is determined by the configuration setting |
4949
| datafusion.execution.collect_statistics | false | Should DataFusion collect statistics after listing files |

0 commit comments

Comments
 (0)