You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datafusion.apache.org by gi...@apache.org on 2026/10/08 15:49:33 UTC
(datafusion-comet) 01/01: docs: add an FAQ page with an answer on vectorized Java/Scala UDFs (#6778)
This is an automated email from the ASF dual-hosted git repository.
github-merge-queue[bot] pushed a commit to branch gh-readonly-queue/main/pr-6778-7f9b0aefc8cfb0c5c2412bc9823a5eb1d8d14576
in repository https://gitbox.apache.org/repos/asf/datafusion-comet.git
commit f9dd86d482d136426990186c2f1d42eef6a1ca59
Author: Andy Grove <ag...@apache.org>
AuthorDate: Thu Oct 8 15:49:12 2026 +0000
docs: add an FAQ page with an answer on vectorized Java/Scala UDFs (#6778)
* docs: add an FAQ page with an answer on vectorized Java/Scala UDFs
The About section gets a Frequently Asked Questions page. Its first
question is whether Comet plans an API for vectorized Java/Scala UDFs
like the Rust UDF API. The answer gives what the prototype in #6697
found: for simple functions the vectorized form saved about 3 ns per
row once the code generator's overheads were removed, which did not
justify the API's cost to users. It also says where a vectorized
function could still pay off, and points to #6694 for those use cases.
* docs: shorten the vectorized UDF FAQ answer
---
docs/source/about/faq.md | 37 +++++++++++++++++++++++++++++++++++++
docs/source/about/index.md | 5 ++++-
2 files changed, 41 insertions(+), 1 deletion(-)
diff --git a/docs/source/about/faq.md b/docs/source/about/faq.md
new file mode 100644
index 0000000000..f7313fac28
--- /dev/null
+++ b/docs/source/about/faq.md
@@ -0,0 +1,37 @@
+<!---
+ 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.
+-->
+
+# Frequently Asked Questions
+
+## Does Comet plan to add an API for vectorized Java/Scala UDFs similar to the Rust UDF API?
+
+Not at the moment. Comet already runs ordinary Scala and Java UDFs in its pipeline without code
+changes, compiling each call into a loop over a whole batch that the JVM optimizes well. See
+[Scala UDF and Java UDF Support](../user-guide/latest/scala_java_udfs.md).
+
+A prototype ([#6697](https://github.com/apache/datafusion-comet/pull/6697)) found that, once the code
+generator's overheads were reduced, a vectorized rewrite of a simple function such as `x + 1` saved
+only about 3 ns per row. That does not justify asking users to rewrite their functions against
+Comet's relocated Arrow classes and rebuild them for every Comet release, so the effort is going into
+the code generator instead.
+
+If you have a use case that a function of one row handles poorly, such as working on the UTF-8 bytes
+of strings or calling a library that processes whole batches, please describe it in
+[#6694](https://github.com/apache/datafusion-comet/issues/6694). For native speed, see the
+experimental [Rust UDF API](../user-guide/latest/rust_udfs.md).
diff --git a/docs/source/about/index.md b/docs/source/about/index.md
index c5bddb38d1..fc30f765c7 100644
--- a/docs/source/about/index.md
+++ b/docs/source/about/index.md
@@ -20,10 +20,12 @@ under the License.
# About
Background on the project: how Comet compares to similar accelerators, how releases
-are versioned, and links to the Apache Software Foundation resources behind it.
+are versioned, answers to common questions, and links to the Apache Software Foundation resources
+behind it.
- [Comparison with Gluten](gluten_comparison.md) — how Comet differs from other Spark accelerators
- [Versioning Policy](versioning_policy.md) — what our version numbers mean and our release cadence
+- [Frequently Asked Questions](faq.md) — answers to common questions about Comet's features and plans
- [Blog Posts and Talks](blogs-and-talks.md) — external writing and conference talks about Comet
- [ASF Links](../asf/index.md) — licensing, donations, security reporting, and the code of conduct
@@ -34,6 +36,7 @@ are versioned, and links to the Apache Software Foundation resources behind it.
Comparison with Gluten <gluten_comparison>
Versioning Policy <versioning_policy>
+Frequently Asked Questions <faq>
Blog Posts and Talks <blogs-and-talks>
ASF Links <../asf/index>
```
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datafusion.apache.org
For additional commands, e-mail: commits-help@datafusion.apache.org