alamb commented on code in PR #14579:
URL: https://github.com/apache/datafusion/pull/14579#discussion_r1957153878


##########
datafusion/ffi/src/signature.rs:
##########
@@ -0,0 +1,295 @@
+// 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.
+
+use std::num::NonZeroUsize;
+
+use abi_stable::{std_types::RVec, StableAbi};
+use arrow::datatypes::DataType;
+use arrow::ffi::FFI_ArrowSchema;
+use datafusion::{
+    error::DataFusionError,
+    logical_expr::{
+        ArrayFunctionSignature, Signature, TypeSignature, TypeSignatureClass, 
Volatility,
+    },
+};
+
+use crate::arrow_wrappers::WrappedSchema;
+use datafusion::error::Result;
+
+#[repr(C)]
+#[derive(StableAbi)]
+#[allow(non_camel_case_types)]
+pub struct FFI_Signature {

Review Comment:
   I wonder if we should keep this API simpler as I think the actual signature 
API is about to change in the near future. For example, the work from 
@jayzhan211 and @shehabgamin  in the following PR
   - https://github.com/apache/datafusion/pull/14440
   
   One thought I had was to to only support the equivalent of 
[`TypeSignature::UserDefined`](https://docs.rs/datafusion/latest/datafusion/logical_expr/enum.TypeSignature.html#variant.UserDefined)
   
   While this would make it somewhat less conveniente to implement user defined 
functions  I think it would result in much smaller FFI API and also be much 
less likely to change overtime
   
   Maybe once the TypeSignature / Coecion code has settled down we could add 
more to the FFI interface
   
   
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to