# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. [package] name = "datafusion-functions" description = "Function packages for the DataFusion query engine" keywords = ["datafusion", "logical", "plan", "expressions"] readme = "README.md" version = { workspace = true } edition = { workspace = true } homepage = { workspace = true } repository = { workspace = true } license = { workspace = true } authors = { workspace = true } rust-version = { workspace = true } [lints] workspace = true [features] # enable core functions core_expressions = [] crypto_expressions = ["md-5", "sha2", "blake2", "blake3"] # enable datetime functions datetime_expressions = [] # Enable encoding by default so the doctests work. In general don't automatically enable all packages. default = [ "core_expressions", "datetime_expressions", "encoding_expressions", "math_expressions", "regex_expressions", "string_expressions", "unicode_expressions", ] # enable encode/decode functions encoding_expressions = ["base64", "hex"] # enable math functions math_expressions = [] # enable regular expressions regex_expressions = ["regex"] # enable string functions string_expressions = ["uuid"] # enable unicode functions unicode_expressions = ["hashbrown", "unicode-segmentation"] [lib] name = "datafusion_functions" path = "src/lib.rs" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] arrow = { workspace = true } arrow-buffer = { workspace = true } base64 = { version = "0.22", optional = true } blake2 = { version = "^0.10.2", optional = true } blake3 = { version = "1.0", optional = true } chrono = { workspace = true } datafusion-common = { workspace = true } datafusion-execution = { workspace = true } datafusion-expr = { workspace = true } hashbrown = { workspace = true, optional = true } hex = { version = "0.4", optional = true } itertools = { workspace = true } log = { workspace = true } md-5 = { version = "^0.10.0", optional = true } rand = { workspace = true } regex = { workspace = true, optional = true } sha2 = { version = "^0.10.1", optional = true } unicode-segmentation = { version = "^1.7.1", optional = true } uuid = { version = "1.7", features = ["v4"], optional = true } [dev-dependencies] arrow = { workspace = true, features = ["test_utils"] } criterion = "0.5" rand = { workspace = true } rstest = { workspace = true } tokio = { workspace = true, features = ["macros", "rt", "sync"] } [[bench]] harness = false name = "concat" required-features = ["string_expressions"] [[bench]] harness = false name = "to_timestamp" required-features = ["datetime_expressions"] [[bench]] harness = false name = "encoding" required-features = ["encoding_expressions"] [[bench]] harness = false name = "regx" required-features = ["regex_expressions"] [[bench]] harness = false name = "make_date" required-features = ["datetime_expressions"] [[bench]] harness = false name = "iszero" required-features = ["math_expressions"] [[bench]] harness = false name = "nullif" required-features = ["core_expressions"] [[bench]] harness = false name = "date_bin" required-features = ["datetime_expressions"] [[bench]] harness = false name = "to_char" required-features = ["datetime_expressions"] [[bench]] harness = false name = "isnan" required-features = ["math_expressions"] [[bench]] harness = false name = "signum" required-features = ["math_expressions"] [[bench]] harness = false name = "substr_index" required-features = ["unicode_expressions"] [[bench]] harness = false name = "ltrim" required-features = ["string_expressions"] [[bench]] harness = false name = "lower" required-features = ["string_expressions"] [[bench]] harness = false name = "upper" required-features = ["string_expressions"] [[bench]] harness = false name = "pad" required-features = ["unicode_expressions"] [[bench]] harness = false name = "repeat" required-features = ["string_expressions"] [[bench]] harness = false name = "random" required-features = ["math_expressions"] [[bench]] harness = false name = "substr" required-features = ["unicode_expressions"] [[bench]] harness = false name = "character_length" required-features = ["unicode_expressions"] [[bench]] harness = false name = "cot" required-features = ["math_expressions"] [[bench]] harness = false name = "strpos" required-features = ["unicode_expressions"] [[bench]] harness = false name = "trunc" required-features = ["math_expressions"]