tschwarzinger commented on code in PR #26822:
URL: https://github.com/apache/datafusion/pull/26822#discussion_r4765980732
##########
datafusion/common/src/types/canonical_extensions/parquet_variant.rs:
##########
@@ -0,0 +1,48 @@
+// SPDX-License-Identifier: Apache-2.0
+// SPDX-FileCopyrightText: See the NOTICE file distributed with this work for
additional information regarding copyright ownership
+// SPDX-FileContributor: Licensed to the Apache Software Foundation (ASF)
under one or more contributor license agreements
+
+use crate::Result;
+use crate::types::extension::DFExtensionType;
+use arrow::datatypes::DataType;
+use arrow_schema::extension::{ExtensionType, VariantType};
+use std::borrow::Cow;
+
+/// Defines the extension type logic for the canonical `arrow.parquet.variant`
extension type.
+///
+/// See [`DFExtensionType`] for information on DataFusion's extension type
mechanism. See also
+/// [`VariantType`] for the implementation of arrow-rs, which this type uses
internally.
+///
+///
<https://arrow.apache.org/docs/format/CanonicalExtensions.html#parquet-variant>
+#[derive(Debug, Clone)]
+pub struct DFVariant {
Review Comment:
We could do
```rust
pub struct DFVariant {
inner: VariantType,
storage_type: DataType,
}
```
and then `self.inner.serialize_metadata()` but I think this will just be for
the sake of consistency. If Arrow ever tries to update the variant type and
adds some metadata there, we can also add it later.
I am fine with both.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]