Implement native StringView
support for CharacterLength
#11677
Labels
enhancement
New feature or request
StringView
support for CharacterLength
#11677
Is your feature request related to a problem or challenge?
Part of #10918
Initial
StringView
is supported by #11667, which covers some most performance critical workloads, such as loading from parquet, reasonable aggregation, faster filtering etc. However, there are many operators not supported and using those operations will cause DataFusion to castStringViewArray
toStringArray
, which is often unnecessary and slow.Describe the solution you'd like
We should gradually implement native
StringView
support string operators, such aslength
,reverse
, etc.Here's a list of items to help implementing the support:
Add
Utf8View
to the function signature, e.g., https://github.com/apache/datafusion/blob/main/datafusion/functions/src/unicode/character_length.rs#L46-L50Handle
Utf8View
in the invocation. The function likely already need to handleUtf8
andLargeUtf8
, so we should just add a new case to the type matchWrite tests for the new
Utf8View
. As we now have three string types, it often need to restructure the test logic to reduce duplicated code.Make sure the test cases cover long (> 12 byte) and short strings.
Describe alternatives you've considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: