This is an automated email from the ASF dual-hosted git repository.
comphead pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/datafusion.git
The following commit(s) were added to refs/heads/main by this push:
new 50e6114dd6 Update `upgrading.md` for new unified config for sql string
mapping to utf8view (#16809)
50e6114dd6 is described below
commit 50e6114dd6c0f6d05ef620350762684248860eb2
Author: Qi Zhu <[email protected]>
AuthorDate: Thu Jul 17 23:44:53 2025 +0800
Update `upgrading.md` for new unified config for sql string mapping to
utf8view (#16809)
* Update upgrade md for new unified config for sql string mapping to
utf8view
* fix formtat
* fix
* format
* Update docs/source/library-user-guide/upgrading.md
---------
Co-authored-by: Oleks V <[email protected]>
---
docs/source/library-user-guide/upgrading.md | 50 +++++++++++++++++++++++++++++
1 file changed, 50 insertions(+)
diff --git a/docs/source/library-user-guide/upgrading.md
b/docs/source/library-user-guide/upgrading.md
index b7e74711cc..e6a2f06305 100644
--- a/docs/source/library-user-guide/upgrading.md
+++ b/docs/source/library-user-guide/upgrading.md
@@ -120,6 +120,56 @@ SET datafusion.execution.spill_compression = 'zstd';
For more details about this configuration option, including performance
trade-offs between different compression codecs, see the [Configuration
Settings](../user-guide/configs.md) documentation.
+### Deprecated `map_varchar_to_utf8view` configuration option
+
+See [issue #16290](https://github.com/apache/datafusion/pull/16290) for more
information
+The old configuration
+
+```text
+datafusion.sql_parser.map_varchar_to_utf8view
+```
+
+is now **deprecated** in favor of the unified option below.\
+If you previously used this to control only `VARCHAR`→`Utf8View` mapping,
please migrate to `map_string_types_to_utf8view`.
+
+---
+
+### New `map_string_types_to_utf8view` configuration option
+
+To unify **all** SQL string types (`CHAR`, `VARCHAR`, `TEXT`, `STRING`) to
Arrow’s zero‑copy `Utf8View`, DataFusion 49.0.0 introduces:
+
+- **Key**: `datafusion.sql_parser.map_string_types_to_utf8view`
+- **Default**: `true`
+
+**Description:**
+
+- When **true** (default), **all** SQL string types are mapped to `Utf8View`,
avoiding full‑copy UTF‑8 allocations and improving performance.
+- When **false**, DataFusion falls back to the legacy `Utf8` mapping for
**all** string types.
+
+#### Examples
+
+```rust
+# /* comment to avoid running
+// Disable Utf8View mapping for all SQL string types
+let opts = datafusion::sql::planner::ParserOptions::new()
+ .with_map_string_types_to_utf8view(false);
+
+// Verify the setting is applied
+assert!(!opts.map_string_types_to_utf8view);
+# */
+```
+
+---
+
+```sql
+-- Disable Utf8View mapping globally
+SET datafusion.sql_parser.map_string_types_to_utf8view = false;
+
+-- Now VARCHAR, CHAR, TEXT, STRING all use Utf8 rather than Utf8View
+CREATE TABLE my_table (a VARCHAR, b TEXT, c STRING);
+DESCRIBE my_table;
+```
+
### Deprecating `SchemaAdapterFactory` and `SchemaAdapter`
We are moving away from converting data (using `SchemaAdapter`) to converting
the expressions themselves (which is more efficient and flexible).
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]