Skip to content

Commit d62be49

Browse files
committed
Minor changes
1 parent 6a42564 commit d62be49

2 files changed

Lines changed: 10 additions & 9 deletions

File tree

datafusion/common/src/types/canonical_extensions/uuid.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ use arrow::util::display::{ArrayFormatter, DisplayIndex, FormatOptions, FormatRe
2323
use arrow_schema::ArrowError;
2424
use arrow_schema::extension::{ExtensionType, Uuid};
2525
use std::fmt::Write;
26-
use uuid::{Bytes, Uuid as UuidImpl};
26+
use uuid::Bytes;
2727

2828
/// Defines the extension type logic for the canonical `arrow.uuid` extension type.
2929
///
@@ -106,7 +106,7 @@ impl DisplayIndex for UuidValueDisplayIndex<'_> {
106106

107107
let bytes = Bytes::try_from(self.array.value(idx))
108108
.expect("FixedSizeBinaryArray length checked in create_array_formatter");
109-
let uuid = UuidImpl::from_bytes(bytes);
109+
let uuid = uuid::Uuid::from_bytes(bytes);
110110
write!(f, "{uuid}")?;
111111
Ok(())
112112
}

datafusion/common/src/types/extension.rs

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,14 @@ pub type DFExtensionTypeRef = Arc<dyn DFExtensionType>;
5656
/// extension type registries. In the future, the two implementations may increasingly converge.
5757
///
5858
/// Another difference is that [`DFExtensionType`] represents a fully resolved extension type that
59-
/// has a fixed storage type (i.e., [`DataType`]). This is different from arrow-rs, which does not
60-
/// have a fixed storage type. For example, while the DataFusion and arrow-rs JSON types share the
61-
/// same metadata, an instance of DataFusion's extension type chooses one of the three possible
62-
/// storage types: [`DataType::Utf8`], [`DataType::LargeUtf8`], or [`DataType::Utf8View`].
63-
/// This fixed storaga type is returned in [`DFExtensionType::storage_type`]. This is also the
64-
/// reason why we have different structs in DataFusion (e.g., [`DFJson`](crate::types::DFJson)
65-
/// instead of [`Json`](arrow_schema::extension::Json)).
59+
/// has a fixed storage type (i.e., [`DataType`]). This is different from arrow-rs, which only
60+
/// stores the extension type's metadata. For example, an instance of DataFusion's JSON extension
61+
/// type fixes one of the three possible storage types: [`DataType::Utf8`],
62+
/// [`DataType::LargeUtf8`], or [`DataType::Utf8View`]. This fixed storaga type is returned in
63+
/// [`DFExtensionType::storage_type`]. This is not possible in arrow-rs' extension type instances.
64+
/// This is the reason why we have different types in DataFusion that usually delegate the metadata
65+
/// processing to the underlying arrow-rs extension type instance
66+
/// (e.g., [`DFJson`](crate::types::DFJson) instead of [`Json`](arrow_schema::extension::Json)).
6667
///
6768
/// # Examples
6869
///

0 commit comments

Comments
 (0)