diff --git a/src/series/mod.rs b/src/series/mod.rs index 8db9640593..7fc85449d6 100644 --- a/src/series/mod.rs +++ b/src/series/mod.rs @@ -44,7 +44,7 @@ impl Series { } pub fn as_physical(&self) -> DaftResult { let physical_dtype = self.data_type().to_physical(); - if &physical_dtype == self.data_type() || self.data_type().is_extension() { + if &physical_dtype == self.data_type() { Ok(self.clone()) } else { self.inner.cast(&physical_dtype) diff --git a/tests/table/test_from_py.py b/tests/table/test_from_py.py index 5f90c0736a..3b0396fffa 100644 --- a/tests/table/test_from_py.py +++ b/tests/table/test_from_py.py @@ -120,7 +120,7 @@ "timestamp": pa.timestamp("us"), } -if ARROW_VERSION >= (12, 0, 0) and get_context().runner_config.name == "ray": +if ARROW_VERSION >= (12, 0, 0) and get_context().runner_config.name != "ray": ARROW_ROUNDTRIP_TYPES["canonical_tensor"] = pa.fixed_shape_tensor(pa.int64(), (2, 2)) ARROW_TYPE_ARRAYS["canonical_tensor"] = pa.FixedShapeTensorArray.from_numpy_ndarray( np.array(PYTHON_TYPE_ARRAYS["tensor"]) @@ -158,6 +158,7 @@ def test_from_pydict_roundtrip() -> None: def test_from_pydict_arrow_roundtrip(uuid_ext_type) -> None: arrow_roundtrip_types, arrow_type_arrays = _with_uuid_ext_type(uuid_ext_type) + print(arrow_roundtrip_types) table = Table.from_pydict(arrow_type_arrays) assert len(table) == 2 assert set(table.column_names()) == set(arrow_type_arrays.keys())