Skip to content

Commit 60d9666

Browse files
osipovartemeadgbear
authored andcommitted
Snowflake timestamp_from_parts udf (#297)
* Inital version * snowflake timestamp_from_parts udf * Fix clippy * Fix example typo * Support negative values
1 parent 4bf074c commit 60d9666

File tree

4 files changed

+607
-0
lines changed

4 files changed

+607
-0
lines changed

Cargo.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ datafusion = { version = "45.0.0" }
4242
datafusion-common = { version = "45.0.0" }
4343
datafusion-expr = { version = "45.0.0" }
4444
datafusion-physical-plan = { version = "45.0.0" }
45+
datafusion-doc = { version = "45.0.0" }
46+
datafusion-macros = { version = "45.0.0" }
4547

4648
# do not change iceberg-rust, datafusion-functions-json hash commits unless datafusion version bumped
4749
datafusion-functions-json = { git = "https://github.com/Embucket/datafusion-functions-json.git", rev = "f2b9b88cd9b4282bc0286a970333e8c01cec177b" }
@@ -54,6 +56,8 @@ datafusion = { git = "https://github.com/Embucket/datafusion.git", rev = "314a72
5456
datafusion-common = { git = "https://github.com/Embucket/datafusion.git", rev = "314a72634dc4f15242345fd17dc32df6c3ae04e8" }
5557
datafusion-expr = { git = "https://github.com/Embucket/datafusion.git", rev = "314a72634dc4f15242345fd17dc32df6c3ae04e8" }
5658
datafusion-physical-plan = { git = "https://github.com/Embucket/datafusion.git", rev = "314a72634dc4f15242345fd17dc32df6c3ae04e8" }
59+
datafusion-doc = { git = "https://github.com/Embucket/datafusion.git", rev = "314a72634dc4f15242345fd17dc32df6c3ae04e8" }
60+
datafusion-macros = { git = "https://github.com/Embucket/datafusion.git", rev = "314a72634dc4f15242345fd17dc32df6c3ae04e8" }
5761

5862
[workspace.lints.clippy]
5963
all = { level = "deny", priority = -1 }

crates/runtime/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ datafusion-common = { workspace = true }
1919
datafusion-expr = { workspace = true }
2020
datafusion-functions-json = { workspace = true }
2121
datafusion-physical-plan = { workspace = true }
22+
datafusion-doc = { workspace = true }
23+
datafusion-macros = { workspace = true }
2224
datafusion_iceberg = { workspace = true }
2325

2426
futures = { workspace = true }

crates/runtime/src/datafusion/functions/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,15 @@ mod convert_timezone;
2323
mod date_add;
2424
mod date_diff;
2525
mod parse_json;
26+
mod timestamp_from_parts;
2627

2728
pub fn register_udfs(registry: &mut dyn FunctionRegistry) -> Result<()> {
2829
let functions: Vec<Arc<ScalarUDF>> = vec![
2930
convert_timezone::get_udf(),
3031
date_add::get_udf(),
3132
parse_json::get_udf(),
3233
date_diff::get_udf(),
34+
timestamp_from_parts::get_udf(),
3335
];
3436

3537
for func in functions {

0 commit comments

Comments
 (0)