Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 9 additions & 2 deletions datafusion-pg-functions/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,11 @@ full = [
# Mathematical Functions and Operators
math = ["dep:libm", "dep:rand"]
# String Functions and Operators
string = []
string = [
"dep:regex",
"dep:unicode-normalization",
"dep:icu_properties",
]
# Binary String Functions and Operators
binary = []
# Bit String Functions and Operators
Expand Down Expand Up @@ -89,6 +93,9 @@ row = []
datafusion = { workspace = true, features = ["nested_expressions"] }
libm = { version = "0.2", optional = true }
rand = { version = "0.10", optional = true }
regex = { version = "1", optional = true }
unicode-normalization = { version = "0.1", optional = true }
icu_properties = { version = "2.1", optional = true }

[dev-dependencies]
async-trait = "0.1"
Expand All @@ -100,4 +107,4 @@ tokio = { workspace = true, features = ["macros", "rt", "fs"] }
[[test]]
name = "sqllogictest"
path = "tests/sqllogictest.rs"
required-features = ["math"]
required-features = ["math", "string"]
14 changes: 7 additions & 7 deletions datafusion-pg-functions/functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ implementation strategy in DataFusion.
| [Subquery Expressions](#functions-subquery) | 0 | 0 | 0 | 0 | 0 | 0 | 0+0 | 0 |
| [Row and Array Comparisons](#functions-comparisons) | 0 | 0 | 0 | 0 | 0 | 0 | 0+0 | 0 |
| [Mathematical](#functions-math) | 55 | 33 | 18 | 0 | 0 | 4 | 0+0 | 0 |
| [String](#functions-string) | 61 | 42 | 2 | 0 | 17 | 0 | 0+4 | 0 |
| [String](#functions-string) | 61 | 42 | 16 | 0 | 3 | 0 | 0+4 | 0 |
| [Binary String](#functions-binarystring) | 30 | 20 | 0 | 0 | 10 | 0 | 0+4 | 0 |
| [Bit String](#functions-bitstring) | 9 | 6 | 0 | 0 | 0 | 0 | 0+3 | 3 |
| [Pattern Matching](#functions-matching) | 15 | 7 | 0 | 0 | 4 | 0 | 3+2 | 0 |
Expand All @@ -85,7 +85,7 @@ implementation strategy in DataFusion.
| [System Administration](#functions-admin) | 105 | 0 | 2 | 0 | 5 | 0 | 0+0 | 98 |
| [Trigger](#functions-trigger) | 3 | 0 | 0 | 0 | 0 | 0 | 0+0 | 3 |
| [Event Trigger](#functions-event-triggers) | 5 | 0 | 0 | 0 | 0 | 0 | 0+0 | 5 |
| **TOTAL** | **768** | **198** | **40** | **4** | **85** | **65** | **21** | **371** |
| **TOTAL** | **768** | **198** | **54** | **4** | **71** | **65** | **21** | **371** |

---

Expand Down Expand Up @@ -210,7 +210,7 @@ implementation strategy in DataFusion.

## String Functions and Operators

*Section `functions-string` Β· Module: [`string`](src/string.rs)
*Section `functions-string` Β· Module: [`string`](src/string/)

| Function | Kind | Status | Pri | #overloads | Description | Notes |
|---|:---:|:---:|:---:|---:|---|---|
Expand Down Expand Up @@ -248,9 +248,9 @@ implementation strategy in DataFusion.
| `regexp_match` | fn | βœ… | β€” | 2 | find first match for regexp | Native DataFusion |
| `regexp_matches` | fn | 🚧 | P2 | 2 | find match(es) for regexp | Postgres is set-returning; DataFusion returns an array. |
| `regexp_replace` | fn | βœ… | β€” | 5 | replace text using regexp | Native DataFusion |
| `regexp_split_to_array` | fn | 🚧 | P2 | 2 | split string by pattern | |
| `regexp_split_to_array` | fn | πŸ”§ | β€” | 2 | split string by pattern | |
| `regexp_split_to_table` | fn | 🚧 | P2 | 2 | split string by pattern | Set-returning. |
| `regexp_substr` | fn | 🚧 | P2 | 5 | extract substring that matches regexp | |
| `regexp_substr` | fn | πŸ”§ | β€” | 5 | extract substring that matches regexp | |
| `repeat` | fn | βœ… | β€” | 1 | replicate string n times | Native DataFusion |
| `replace` | fn | βœ… | β€” | 1 | replace all occurrences in string of old_substr with new_substr | Native DataFusion |
| `reverse` | fn | βœ… | β€” | 2 | reverse bytea | Native DataFusion |
Expand Down Expand Up @@ -344,9 +344,9 @@ implementation strategy in DataFusion.
| `regexp_match` | fn | βœ… | β€” | 2 | find first match for regexp | Native DataFusion |
| `regexp_matches` | fn | 🚧 | P2 | 2 | find match(es) for regexp | Postgres is set-returning; DataFusion returns an array. |
| `regexp_replace` | fn | βœ… | β€” | 5 | replace text using regexp | Native DataFusion |
| `regexp_split_to_array` | fn | 🚧 | P2 | 2 | split string by pattern | |
| `regexp_split_to_array` | fn | πŸ”§ | β€” | 2 | split string by pattern | |
| `regexp_split_to_table` | fn | 🚧 | P2 | 2 | split string by pattern | Set-returning. |
| `regexp_substr` | fn | 🚧 | P2 | 5 | extract substring that matches regexp | |
| `regexp_substr` | fn | πŸ”§ | β€” | 5 | extract substring that matches regexp | |
| `similar to` | op | 🚧 | P2 | 0 | β€” | |
| `starts_with` | fn | βœ… | β€” | 1 | β€” | Native DataFusion |
| `substring` | both | βœ… | β€” | 8 | extract text matching SQL regular expression | Native DataFusion. Postgres 1-based offsets. |
Expand Down
17 changes: 0 additions & 17 deletions datafusion-pg-functions/src/string.rs

This file was deleted.

Loading
Loading