Skip to content
Draft
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
2 changes: 1 addition & 1 deletion docs/source/contributor-guide/spark_expressions_support.md
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,7 @@

### url_funcs

- [x] parse_url (Incompatible: native diverges from Spark on edge cases)
- [x] parse_url
- [x] try_url_decode
- 4.0.1, 2026-05-05
- [x] url_decode
Expand Down
7 changes: 3 additions & 4 deletions native/core/src/execution/jni_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ use datafusion::{
prelude::{SessionConfig, SessionContext},
};
use datafusion_comet_proto::spark_operator::Operator;
use datafusion_comet_spark_expr::url_funcs::{CometParseUrl, CometTryParseUrl};
use datafusion_spark::function::array::array_contains::SparkArrayContains;
use datafusion_spark::function::bitwise::bit_count::SparkBitCount;
use datafusion_spark::function::bitwise::bit_get::SparkBitGet;
Expand All @@ -67,8 +68,6 @@ use datafusion_spark::function::string::char::CharFunc;
use datafusion_spark::function::string::concat::SparkConcat;
use datafusion_spark::function::string::luhn_check::SparkLuhnCheck;
use datafusion_spark::function::string::space::SparkSpace;
use datafusion_spark::function::url::parse_url::ParseUrl as SparkParseUrl;
use datafusion_spark::function::url::try_parse_url::TryParseUrl as SparkTryParseUrl;
use datafusion_spark::function::url::try_url_decode::TryUrlDecode as SparkTryUrlDecode;
use datafusion_spark::function::url::url_decode::UrlDecode as SparkUrlDecode;
use datafusion_spark::function::url::url_encode::UrlEncode as SparkUrlEncode;
Expand Down Expand Up @@ -601,8 +600,8 @@ fn register_datafusion_spark_function(session_ctx: &SessionContext) {
session_ctx.register_udf(ScalarUDF::new_from_impl(SparkUrlEncode::default()));
session_ctx.register_udf(ScalarUDF::new_from_impl(SparkTryUrlDecode::default()));
session_ctx.register_udf(ScalarUDF::new_from_impl(SparkCsc::default()));
session_ctx.register_udf(ScalarUDF::new_from_impl(SparkParseUrl::default()));
session_ctx.register_udf(ScalarUDF::new_from_impl(SparkTryParseUrl::default()));
session_ctx.register_udf(ScalarUDF::new_from_impl(CometParseUrl::default()));
session_ctx.register_udf(ScalarUDF::new_from_impl(CometTryParseUrl::default()));
session_ctx.register_udf(ScalarUDF::new_from_impl(SparkFactorial::default()));
session_ctx.register_udf(ScalarUDF::new_from_impl(SparkSec::default()));
}
Expand Down
1 change: 1 addition & 0 deletions native/spark-expr/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ mod map_funcs;
pub use map_funcs::spark_map_sort;
mod math_funcs;
mod nondetermenistic_funcs;
pub mod url_funcs;

pub use array_funcs::*;
pub use conditional_funcs::*;
Expand Down
20 changes: 20 additions & 0 deletions native/spark-expr/src/url_funcs/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// 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.

mod parse_url;

pub use parse_url::{CometParseUrl, CometTryParseUrl};
Loading
Loading