neilechao commented on code in PR #45375:
URL: https://github.com/apache/arrow/pull/45375#discussion_r2027764260
##########
cpp/src/parquet/arrow/schema.cc:
##########
@@ -434,6 +454,11 @@ Status FieldToNode(const std::string& name, const
std::shared_ptr<Field>& field,
type = ParquetType::BYTE_ARRAY;
logical_type = LogicalType::JSON();
break;
+ } else if (ext_type->extension_name() == std::string("parquet.variant"))
{
+ auto variant_type =
std::static_pointer_cast<VariantExtensionType>(field->type());
Review Comment:
For now, that is possible, but in the future when we add shredded variant
support, it gets more complicated and we would need a visitor to traverse the
variant type tree rather than asserting on the top-level fields. That's one
reason why I prefer the explicit VariantExtensionType cast.
--
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]