You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "kosiew (via GitHub)" <gi...@apache.org> on 2025/10/22 10:41:08 UTC

[PR] Preserve PyArrow extension metadata when chaining Python scalar UDFs [datafusion-python]

kosiew opened a new pull request, #1287:
URL: https://github.com/apache/datafusion-python/pull/1287

   
   
   ## Which issue does this PR close?
   
   Closes #1172
   ---
   
   ## Rationale for this change
   
   When multiple scalar UDFs are chained in Python, the intermediate results lose PyArrow extension metadata.
   This happens because the existing binding only passed `arrow::datatypes::DataType` to Rust’s `ScalarUDF`, discarding extension information embedded in `pyarrow.Field`.
   
   This patch ensures that DataFusion’s Python UDF layer preserves the **complete field metadata**, allowing extension arrays (e.g. `arrow.uuid`, custom logical types) to survive round-trips between Python and Rust.
   
   ---
   
   ## What changes are included in this PR?
   
   ### 🔧 Python (`python/datafusion/user_defined.py`)
   
   * Introduced `PyArrowArray` and `PyArrowArrayT` aliases for unified typing of `Array` and `ChunkedArray`.
   * Added normalization utilities:
   
     * `_normalize_field`, `_normalize_input_fields`, `_normalize_return_field`
     * `_wrap_extension_value` and `_wrap_udf_function` to automatically re-wrap extension arrays on UDF input/output.
   * Updated `ScalarUDF` constructor and decorator overloads to accept both `pa.Field` and `pa.DataType` objects.
   * Ensured `ScalarUDF` passes fully qualified `Field` objects (with metadata) to the internal layer.
   
   ### 🧰 Rust (`src/udf.rs`)
   
   * Added a new `PySimpleScalarUDF` implementing `ScalarUDFImpl`:
   
     * Preserves `arrow::datatypes::Field` for inputs and return values.
     * Implements `return_field_from_args` to keep field names and extension metadata.
   * Updated the PyO3 binding to accept and expose `Vec<Field>` instead of `Vec<DataType>`.
   * Refactored construction to use `ScalarUDF::new_from_impl()`.
   
   ### 🤖 Tests (`python/tests/test_udf.py`)
   
   * Added `test_uuid_extension_chain` verifying that:
   
     * Chained UDFs correctly round-trip `arrow.uuid` arrays.
     * Empty extension arrays are handled without type loss.
     * UDF input/output extension metadata remains intact.
   
   ---
   
   ## Are these changes tested?
   
   ✅ Yes.
   The new test suite `test_uuid_extension_chain` explicitly covers:
   
   * Chaining of UUID extension UDFs.
   * Handling of empty extension arrays.
   * Type preservation between UDF boundaries.
     Existing decorator and parameterized UDF tests remain intact and continue to pass.
   
   ---
   
   ## Are there any user-facing changes?
   
   Yes — **enhanced behavior for PyArrow extension arrays** in Python UDFs.
   
   * Users can now declare `input_types` and `return_type` as either `pa.DataType` or `pa.Field`.
   * Chained scalar UDFs now preserve PyArrow extension metadata (e.g. `arrow.uuid`, custom registered extensions).
   * Existing non-extension UDFs continue to function unchanged.
   
   No breaking API changes are introduced — the update is fully backward-compatible while extending functionality.
   
   
   


-- 
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-unsubscribe@datafusion.apache.org

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


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


Re: [PR] Preserve PyArrow extension metadata when chaining Python scalar UDFs [datafusion-python]

Posted by "timsaucer (via GitHub)" <gi...@apache.org>.
timsaucer commented on code in PR #1287:
URL: https://github.com/apache/datafusion-python/pull/1287#discussion_r2469364822


##########
python/datafusion/user_defined.py:
##########
@@ -357,10 +473,12 @@ def udaf(*args: Any, **kwargs: Any):  # noqa: D417, C901
         This class allows you to define an aggregate function that can be used in
         data aggregation or window function calls.
 
-        Usage:
-            - As a function: ``udaf(accum, input_types, return_type, state_type, volatility, name)``.
-            - As a decorator: ``@udaf(input_types, return_type, state_type, volatility, name)``.
-              When using ``udaf`` as a decorator, do not pass ``accum`` explicitly.
+                Usage:
+                        - As a function: ``udaf(accum, input_types, return_type, state_type,``
+                            ``volatility, name)``.
+                        - As a decorator: ``@udaf(input_types, return_type, state_type,``
+                            ``volatility, name)``.
+                            When using ``udaf`` as a decorator, do not pass ``accum`` explicitly.

Review Comment:
   It looks like the formatting got changed. Is this intentional?



-- 
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-unsubscribe@datafusion.apache.org

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


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


Re: [PR] Preserve PyArrow extension metadata when chaining Python scalar UDFs [datafusion-python]

Posted by "timsaucer (via GitHub)" <gi...@apache.org>.
timsaucer closed pull request #1287: Preserve PyArrow extension metadata when chaining Python scalar UDFs
URL: https://github.com/apache/datafusion-python/pull/1287


-- 
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-unsubscribe@datafusion.apache.org

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


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


Re: [PR] Preserve PyArrow extension metadata when chaining Python scalar UDFs [datafusion-python]

Posted by "kosiew (via GitHub)" <gi...@apache.org>.
kosiew commented on code in PR #1287:
URL: https://github.com/apache/datafusion-python/pull/1287#discussion_r2454443004


##########
pyproject.toml:
##########
@@ -129,25 +129,33 @@ extend-allowed-calls = ["lit", "datafusion.lit"]
 ]
 "examples/*" = ["D", "W505", "E501", "T201", "S101"]
 "dev/*" = ["D", "E", "T", "S", "PLR", "C", "SIM", "UP", "EXE", "N817"]
-"benchmarks/*" = ["D", "F", "T", "BLE", "FURB", "PLR", "E", "TD", "TRY", "S", "SIM", "EXE", "UP"]
+"benchmarks/*" = [
+    "D",
+    "F",
+    "T",
+    "BLE",
+    "FURB",
+    "PLR",
+    "E",
+    "TD",
+    "TRY",
+    "S",
+    "SIM",
+    "EXE",
+    "UP",
+]
 "docs/*" = ["D"]
 
 [tool.codespell]
-skip = [
-    "./target",
-    "uv.lock",
-    "./python/tests/test_functions.py"
-]
+skip = ["./target", "uv.lock", "./python/tests/test_functions.py"]
 count = true
-ignore-words-list = [
-    "ans",
-    "IST"
-]
+ignore-words-list = ["ans", "IST"]
 
 [dependency-groups]
 dev = [
     "maturin>=1.8.1",
     "numpy>1.25.0",
+    "pyarrow>=19.0.0",

Review Comment:
   This is the change added to ensure pa.uuid() is available for test_udf.py.
   
   https://arrow.apache.org/docs/19.0/python/generated/pyarrow.uuid.html is the lowest version which contains pyarrow.uuid.
   
   The rest are VSCode automatic formatting.



-- 
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-unsubscribe@datafusion.apache.org

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


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


Re: [PR] Preserve PyArrow extension metadata when chaining Python scalar UDFs [datafusion-python]

Posted by "kosiew (via GitHub)" <gi...@apache.org>.
kosiew commented on code in PR #1287:
URL: https://github.com/apache/datafusion-python/pull/1287#discussion_r2492816436


##########
python/datafusion/user_defined.py:
##########
@@ -77,6 +101,87 @@ def __str__(self) -> str:
         return self.name.lower()
 
 
+def _clone_field(field: pa.Field) -> pa.Field:
+    """Return a deep copy of ``field`` including its DataType."""
+    return pa.schema([field]).field(0)
+
+
+def _normalize_field(value: pa.DataType | pa.Field, *, default_name: str) -> pa.Field:
+    if isinstance(value, pa.Field):
+        return _clone_field(value)
+    if isinstance(value, pa.DataType):
+        return _clone_field(pa.field(default_name, value))
+    msg = "Expected a pyarrow.DataType or pyarrow.Field"
+    raise TypeError(msg)

Review Comment:
   Not at all.



-- 
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-unsubscribe@datafusion.apache.org

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


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


Re: [PR] Preserve PyArrow extension metadata when chaining Python scalar UDFs [datafusion-python]

Posted by "kosiew (via GitHub)" <gi...@apache.org>.
kosiew commented on code in PR #1287:
URL: https://github.com/apache/datafusion-python/pull/1287#discussion_r2454625911


##########
python/datafusion/user_defined.py:
##########
@@ -164,10 +270,13 @@ def udf(*args: Any, **kwargs: Any):  # noqa: D417
                 backed ScalarUDF within a PyCapsule, you can pass this parameter
                 and ignore the rest. They will be determined directly from the
                 underlying function. See the online documentation for more information.
-            input_types (list[pa.DataType]): The data types of the arguments
-                to ``func``. This list must be of the same length as the number of
-                arguments.
-            return_type (_R): The data type of the return value from the function.
+                The callable should accept and return :class:`pyarrow.Array` or
+                :class:`pyarrow.ChunkedArray` values.
+            input_types (list[pa.DataType | pa.Field]): The argument types for ``func``.
+                This list must be of the same length as the number of arguments. Pass
+                :class:`pyarrow.Field` instances to preserve extension metadata.
+            return_type (pa.DataType | pa.Field): The return type of the function. Use a
+                :class:`pyarrow.Field` to preserve metadata on extension arrays.

Review Comment:
   Amended.



-- 
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-unsubscribe@datafusion.apache.org

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


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


Re: [PR] Preserve PyArrow extension metadata when chaining Python scalar UDFs [datafusion-python]

Posted by "timsaucer (via GitHub)" <gi...@apache.org>.
timsaucer commented on code in PR #1287:
URL: https://github.com/apache/datafusion-python/pull/1287#discussion_r2452385320


##########
python/datafusion/user_defined.py:
##########
@@ -164,10 +270,13 @@ def udf(*args: Any, **kwargs: Any):  # noqa: D417
                 backed ScalarUDF within a PyCapsule, you can pass this parameter
                 and ignore the rest. They will be determined directly from the
                 underlying function. See the online documentation for more information.
-            input_types (list[pa.DataType]): The data types of the arguments
-                to ``func``. This list must be of the same length as the number of
-                arguments.
-            return_type (_R): The data type of the return value from the function.
+                The callable should accept and return :class:`pyarrow.Array` or
+                :class:`pyarrow.ChunkedArray` values.
+            input_types (list[pa.DataType | pa.Field]): The argument types for ``func``.
+                This list must be of the same length as the number of arguments. Pass
+                :class:`pyarrow.Field` instances to preserve extension metadata.
+            return_type (pa.DataType | pa.Field): The return type of the function. Use a
+                :class:`pyarrow.Field` to preserve metadata on extension arrays.

Review Comment:
   I think this comment is misleading. I do not think there is any guarantee that the output field metadata will be preserved. Instead this should be the way in which you can set output metadata. I think it is entirely possible that a UDF implemented like this can still lose the metadata. One case is where you want to consume it on the input side and output some *different* kind of metadata on your output side.



##########
python/tests/test_udf.py:
##########
@@ -124,3 +130,94 @@ def udf_with_param(values: pa.Array) -> pa.Array:
     result = df2.collect()[0].column(0)
 
     assert result == pa.array([False, True, True])
+
+
+@pytest.mark.skipif(
+    not UUID_EXTENSION_AVAILABLE,
+    reason="PyArrow uuid extension helper unavailable",
+)

Review Comment:
   Can we make the uuid extension a requirement in our developer dependencies?



##########
src/udf.rs:
##########
@@ -80,6 +81,83 @@ fn to_scalar_function_impl(func: PyObject) -> ScalarFunctionImplementation {
     })
 }
 
+#[derive(PartialEq, Eq, Hash)]
+struct PySimpleScalarUDF {
+    name: String,
+    signature: Signature,
+    return_field: Arc<Field>,
+    fun: PtrEq<ScalarFunctionImplementation>,
+}
+
+impl fmt::Debug for PySimpleScalarUDF {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+        f.debug_struct("PySimpleScalarUDF")
+            .field("name", &self.name)
+            .field("signature", &self.signature)
+            .field("return_field", &self.return_field)
+            .finish()
+    }
+}
+
+impl PySimpleScalarUDF {
+    fn new(
+        name: impl Into<String>,
+        input_fields: Vec<Field>,
+        return_field: Field,
+        volatility: Volatility,
+        fun: ScalarFunctionImplementation,
+    ) -> Self {
+        let signature_types = input_fields
+            .into_iter()
+            .map(|field| field.data_type().clone())
+            .collect();
+        let signature = Signature::exact(signature_types, volatility);
+        Self {
+            name: name.into(),
+            signature,
+            return_field: Arc::new(return_field),
+            fun: fun.into(),
+        }
+    }
+}
+
+impl ScalarUDFImpl for PySimpleScalarUDF {
+    fn as_any(&self) -> &dyn std::any::Any {
+        self
+    }
+
+    fn name(&self) -> &str {
+        &self.name
+    }
+
+    fn signature(&self) -> &Signature {
+        &self.signature
+    }
+
+    fn return_type(&self, _arg_types: &[DataType]) -> datafusion::error::Result<DataType> {
+        Ok(self.return_field.data_type().clone())

Review Comment:
   Best practice is to not implement this method. Per the upstream datafusion documentation:
   
   > If you provide an implementation for Self::return_field_from_args, DataFusion will not call return_type (this function). In such cases is recommended to return DataFusionError::Internal.



-- 
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-unsubscribe@datafusion.apache.org

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


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


Re: [PR] Preserve PyArrow extension metadata when chaining Python scalar UDFs [datafusion-python]

Posted by "kosiew (via GitHub)" <gi...@apache.org>.
kosiew commented on code in PR #1287:
URL: https://github.com/apache/datafusion-python/pull/1287#discussion_r2454625018


##########
src/udf.rs:
##########
@@ -80,6 +81,83 @@ fn to_scalar_function_impl(func: PyObject) -> ScalarFunctionImplementation {
     })
 }
 
+#[derive(PartialEq, Eq, Hash)]
+struct PySimpleScalarUDF {
+    name: String,
+    signature: Signature,
+    return_field: Arc<Field>,
+    fun: PtrEq<ScalarFunctionImplementation>,
+}
+
+impl fmt::Debug for PySimpleScalarUDF {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+        f.debug_struct("PySimpleScalarUDF")
+            .field("name", &self.name)
+            .field("signature", &self.signature)
+            .field("return_field", &self.return_field)
+            .finish()
+    }
+}
+
+impl PySimpleScalarUDF {
+    fn new(
+        name: impl Into<String>,
+        input_fields: Vec<Field>,
+        return_field: Field,
+        volatility: Volatility,
+        fun: ScalarFunctionImplementation,
+    ) -> Self {
+        let signature_types = input_fields
+            .into_iter()
+            .map(|field| field.data_type().clone())
+            .collect();
+        let signature = Signature::exact(signature_types, volatility);
+        Self {
+            name: name.into(),
+            signature,
+            return_field: Arc::new(return_field),
+            fun: fun.into(),
+        }
+    }
+}
+
+impl ScalarUDFImpl for PySimpleScalarUDF {
+    fn as_any(&self) -> &dyn std::any::Any {
+        self
+    }
+
+    fn name(&self) -> &str {
+        &self.name
+    }
+
+    fn signature(&self) -> &Signature {
+        &self.signature
+    }
+
+    fn return_type(&self, _arg_types: &[DataType]) -> datafusion::error::Result<DataType> {
+        Ok(self.return_field.data_type().clone())

Review Comment:
   Omitting implementation prevents compilation.
   
   ```
   error[E0046]: not all trait items implemented, missing: `return_type`
      --> src/udf.rs:124:1
       |
   124 | impl ScalarUDFImpl for PySimpleScalarUDF {
       | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `return_type` in implementation
   ```
   I amended it to return
   ```rust
   Err(DataFusionError::Internal(
     "return_type should be unreachable when return_field_from_args is implemented"
       .to_string(),
   ```
   



-- 
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-unsubscribe@datafusion.apache.org

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


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


Re: [PR] Preserve PyArrow extension metadata when chaining Python scalar UDFs [datafusion-python]

Posted by "kosiew (via GitHub)" <gi...@apache.org>.
kosiew commented on code in PR #1287:
URL: https://github.com/apache/datafusion-python/pull/1287#discussion_r2483320138


##########
python/datafusion/user_defined.py:
##########
@@ -357,10 +473,12 @@ def udaf(*args: Any, **kwargs: Any):  # noqa: D417, C901
         This class allows you to define an aggregate function that can be used in
         data aggregation or window function calls.
 
-        Usage:
-            - As a function: ``udaf(accum, input_types, return_type, state_type, volatility, name)``.
-            - As a decorator: ``@udaf(input_types, return_type, state_type, volatility, name)``.
-              When using ``udaf`` as a decorator, do not pass ``accum`` explicitly.
+                Usage:
+                        - As a function: ``udaf(accum, input_types, return_type, state_type,``
+                            ``volatility, name)``.
+                        - As a decorator: ``@udaf(input_types, return_type, state_type,``
+                            ``volatility, name)``.
+                            When using ``udaf`` as a decorator, do not pass ``accum`` explicitly.

Review Comment:
   Reverted accidental formatting change.



-- 
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-unsubscribe@datafusion.apache.org

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


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


Re: [PR] Preserve PyArrow extension metadata when chaining Python scalar UDFs [datafusion-python]

Posted by "kosiew (via GitHub)" <gi...@apache.org>.
kosiew commented on code in PR #1287:
URL: https://github.com/apache/datafusion-python/pull/1287#discussion_r2454443004


##########
pyproject.toml:
##########
@@ -129,25 +129,33 @@ extend-allowed-calls = ["lit", "datafusion.lit"]
 ]
 "examples/*" = ["D", "W505", "E501", "T201", "S101"]
 "dev/*" = ["D", "E", "T", "S", "PLR", "C", "SIM", "UP", "EXE", "N817"]
-"benchmarks/*" = ["D", "F", "T", "BLE", "FURB", "PLR", "E", "TD", "TRY", "S", "SIM", "EXE", "UP"]
+"benchmarks/*" = [
+    "D",
+    "F",
+    "T",
+    "BLE",
+    "FURB",
+    "PLR",
+    "E",
+    "TD",
+    "TRY",
+    "S",
+    "SIM",
+    "EXE",
+    "UP",
+]
 "docs/*" = ["D"]
 
 [tool.codespell]
-skip = [
-    "./target",
-    "uv.lock",
-    "./python/tests/test_functions.py"
-]
+skip = ["./target", "uv.lock", "./python/tests/test_functions.py"]
 count = true
-ignore-words-list = [
-    "ans",
-    "IST"
-]
+ignore-words-list = ["ans", "IST"]
 
 [dependency-groups]
 dev = [
     "maturin>=1.8.1",
     "numpy>1.25.0",
+    "pyarrow>=19.0.0",

Review Comment:
   This is the change added to ensure pa.uuid() is available for test_udf.py.
   The rest are VSCode automatic formatting.



-- 
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-unsubscribe@datafusion.apache.org

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


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


Re: [PR] Preserve PyArrow extension metadata when chaining Python scalar UDFs [datafusion-python]

Posted by "timsaucer (via GitHub)" <gi...@apache.org>.
timsaucer commented on code in PR #1287:
URL: https://github.com/apache/datafusion-python/pull/1287#discussion_r2483700670


##########
python/datafusion/user_defined.py:
##########
@@ -77,6 +101,87 @@ def __str__(self) -> str:
         return self.name.lower()
 
 
+def _clone_field(field: pa.Field) -> pa.Field:
+    """Return a deep copy of ``field`` including its DataType."""
+    return pa.schema([field]).field(0)
+
+
+def _normalize_field(value: pa.DataType | pa.Field, *, default_name: str) -> pa.Field:
+    if isinstance(value, pa.Field):
+        return _clone_field(value)
+    if isinstance(value, pa.DataType):
+        return _clone_field(pa.field(default_name, value))
+    msg = "Expected a pyarrow.DataType or pyarrow.Field"
+    raise TypeError(msg)

Review Comment:
   Something has been bothering me about these functions and I think I finally identified it today. It feels like these are LLM generated naming and approach. I don't know if you're using a LLM or hand writing these, but the naming feels like it obfuscates the intent.
   
   Would you mind if I took a stab at rewriting some of these to be more consistent with the existing code base and what I think conveys meaning a little clearer?



-- 
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-unsubscribe@datafusion.apache.org

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


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


Re: [PR] Preserve PyArrow extension metadata when chaining Python scalar UDFs [datafusion-python]

Posted by "kosiew (via GitHub)" <gi...@apache.org>.
kosiew commented on code in PR #1287:
URL: https://github.com/apache/datafusion-python/pull/1287#discussion_r2454627522


##########
python/tests/test_udf.py:
##########
@@ -124,3 +130,94 @@ def udf_with_param(values: pa.Array) -> pa.Array:
     result = df2.collect()[0].column(0)
 
     assert result == pa.array([False, True, True])
+
+
+@pytest.mark.skipif(
+    not UUID_EXTENSION_AVAILABLE,
+    reason="PyArrow uuid extension helper unavailable",
+)

Review Comment:
   Removed `@pytest.mark.skipif`



-- 
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-unsubscribe@datafusion.apache.org

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


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


Re: [PR] Preserve PyArrow extension metadata when chaining Python scalar UDFs [datafusion-python]

Posted by "timsaucer (via GitHub)" <gi...@apache.org>.
timsaucer commented on PR #1287:
URL: https://github.com/apache/datafusion-python/pull/1287#issuecomment-3847399715

   Closing in favor of #1299


-- 
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-unsubscribe@datafusion.apache.org

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


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