Improve StringView support for SUBSTR (#12044)

* operate stringview instead of generating string in SUBSTR

* treat Utf8View as Text in sqllogictests output

* add bench to see enhancement of utf8view against utf8 and large_utf8

* fix a tiny bug

* make clippy happy

* add tests to cover stringview larger than 12B and correct the code

* better comments

* fix lint

* correct feature setting

* avoid expensive utf8 and some other checks

* fix lint

* remove unnecessary indirection

* add optimized_utf8_to_str_type

* Simplify type check

* Use ByteView

* update datafusion-cli.lock

* Remove duration override

* format toml

* refactor the code, using append_view_u128 from arrow

* manually collect the views and nulls

* remove bench file and fix some comments

* fix tiny mistake

* Update Cargo.lock

---------

Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
1 file changed
tree: ac2ede5bc7272465b5e313e99adeeb5fa2abfd92
  1. .github/
  2. benchmarks/
  3. ci/
  4. datafusion/
  5. datafusion-cli/
  6. datafusion-examples/
  7. dev/
  8. docs/
  9. python/
  10. test-utils/
  11. .asf.yaml
  12. .dockerignore
  13. .editorconfig
  14. .gitattributes
  15. .gitignore
  16. .gitmodules
  17. Cargo.toml
  18. CHANGELOG.md
  19. clippy.toml
  20. CODE_OF_CONDUCT.md
  21. CONTRIBUTING.md
  22. doap.rdf
  23. header
  24. LICENSE.txt
  25. NOTICE.txt
  26. pre-commit.sh
  27. README.md
  28. rustfmt.toml
  29. taplo.toml
README.md

Apache DataFusion

Crates.io Apache licensed Build Status Discord chat

Website | Guides | API Docs | Chat

Apache DataFusion is a very fast, extensible query engine for building high-quality data-centric systems in Rust, using the Apache Arrow in-memory format. Python Bindings are also available. DataFusion offers SQL and Dataframe APIs, excellent performance, built-in support for CSV, Parquet, JSON, and Avro, extensive customization, and a great community.

Here are links to some important information

What can you do with this crate?

DataFusion is great for building projects such as domain specific query engines, new database platforms and data pipelines, query languages and more. It lets you start quickly from a fully working engine, and then customize those features specific to your use. Click Here to see a list known users.

Contributing to DataFusion

Please see the contributor guide and communication pages for more information.

Crate features

This crate has several features which can be specified in your Cargo.toml.

Default features:

  • nested_expressions: functions for working with nested type function such as array_to_string
  • compression: reading files compressed with xz2, bzip2, flate2, and zstd
  • crypto_expressions: cryptographic functions such as md5 and sha256
  • datetime_expressions: date and time functions such as to_timestamp
  • encoding_expressions: encode and decode functions
  • parquet: support for reading the Apache Parquet format
  • regex_expressions: regular expression functions, such as regexp_match
  • unicode_expressions: Include unicode aware functions such as character_length
  • unparser : enables support to reverse LogicalPlans back into SQL

Optional features:

  • avro: support for reading the Apache Avro format
  • backtrace: include backtrace information in error messages
  • pyarrow: conversions between PyArrow and DataFusion types
  • serde: enable arrow-schema's serde feature

Rust Version Compatibility Policy

DataFusion's Minimum Required Stable Rust Version (MSRV) policy is to support each stable Rust version for 6 months after it is released. This generally translates to support for the most recent 3 to 4 stable Rust versions.

We enforce this policy using a MSRV CI Check